-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathDockerfile
More file actions
47 lines (27 loc) · 973 Bytes
/
Copy pathDockerfile
File metadata and controls
47 lines (27 loc) · 973 Bytes
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
44
45
46
47
FROM oven/bun:1-alpine AS build
ARG BUILD_VERSION
ENV BUILD_VERSION=${BUILD_VERSION:-develop}
WORKDIR /app
COPY package*.json ./
RUN bun install
COPY . .
RUN sed -i "s/{{VERSION}}/$BUILD_VERSION/g" ./docker/config.js
RUN bun run build
FROM docker.io/nginxinc/nginx-unprivileged:stable AS prod
LABEL org.opencontainers.image.source="https://github.com/karlomikus/vue-salt-rim"
COPY --from=build --chown=www-data:www-data /app/dist /var/www/html
COPY --from=build --chown=www-data:www-data /app/docker/config.js /var/www/config.js
COPY --chown=www-data:www-data ./docker/entrypoint.sh /usr/local/bin/entrypoint
RUN rm /etc/nginx/conf.d/default.conf
COPY --chown=www-data:www-data ./docker/default.conf /etc/nginx/conf.d/default.conf
USER www-data
EXPOSE 8080
RUN chmod +x /usr/local/bin/entrypoint
CMD [ "/usr/local/bin/entrypoint" ]
FROM oven/bun:1 AS dev
WORKDIR /app
COPY package*.json ./
RUN bun install
COPY . .
EXPOSE 5173
CMD ["bun", "run", "dev"]