-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
43 lines (38 loc) · 892 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
FROM rust:1.68.1-buster AS builder
WORKDIR /home
RUN apt update
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
RUN apt install -y nodejs
#RUN apt install -y npm
COPY ./package.json .
COPY ./tsconfig.json .
COPY ./public ./public
RUN npm i
COPY ./wasm ./wasm
COPY ./src ./src
#ENTRYPOINT ["tail", "-f", "/dev/null"]
RUN npm run build:docker
FROM nginx:1.12-alpine
RUN echo "events { \
worker_connections 1024; \
} \
http { \
include mime.types; \
sendfile on; \
server { \
listen 8080; \
resolver 127.0.0.11; \
autoindex off; \
server_name caua-rinaldi.dev; \
absolute_redirect off; \
root /usr/share/nginx/html; \
server_tokens off; \
gzip_static on; \
\
location / { \
try_files \$uri \$uri/ =404; \
} \
} \
}" > /etc/nginx/nginx.conf
COPY --from=builder /home/build /usr/share/nginx/html
EXPOSE 8080