File tree Expand file tree Collapse file tree 1 file changed +7
-32
lines changed
Expand file tree Collapse file tree 1 file changed +7
-32
lines changed Original file line number Diff line number Diff line change 1- FROM oven/bun:1 AS builder
1+ FROM oven/bun:1 AS base
22WORKDIR /app
33
4- COPY package.json bun.lock ./
4+ COPY . .
55
6- COPY apps/frontend ./apps/frontend
7-
8- RUN bun install --frozen-lockfile
9-
10- WORKDIR /app/apps/frontend
6+ RUN bun i
117RUN bun run build
128
139FROM nginx:alpine
10+ WORKDIR /usr/share/nginx/html
1411
1512RUN rm /etc/nginx/conf.d/default.conf
1613
17- RUN cat <<'EOF' > /etc/nginx/conf.d/default.conf
18- server {
19- listen 80;
20-
21- location / {
22- root /usr/share/nginx/html;
23- index index.html;
24- try_files $uri $uri/ /index.html;
25- }
26-
27- error_page 404 /404.html;
28- location = /404.html {
29- root /usr/share/nginx/html;
30- internal;
31- }
32-
33- error_page 500 502 503 504 /50x.html;
34- location = /50x.html {
35- root /usr/share/nginx/html;
36- internal;
37- }
38- }
39- EOF
40-
41- COPY --from=builder /app/apps/frontend/dist /usr/share/nginx/html
14+ RUN printf 'server {\n listen 80;\n\n location / {\n root /usr/share/nginx/html;\n index index.html;\n try_files $uri $uri/ /index.html;\n }\n\n error_page 404 /404.html;\n location = /404.html {\n root /usr/share/nginx/html;\n internal;\n }\n\n error_page 500 502 503 504 /50x.html;\n location = /50x.html {\n root /usr/share/nginx/html;\n internal;\n }\n }\n ' > /etc/nginx/conf.d/default.conf
15+
16+ COPY --from=base /app/apps/frontend/dist .
4217
4318EXPOSE 80
4419
You can’t perform that action at this time.
0 commit comments