feat(docker): add Docker configuration for frontend app
This commit is contained in:
parent
676473cfad
commit
36237874f7
6 changed files with 65 additions and 32 deletions
23
frontend/.docker/Dockerfile
Normal file
23
frontend/.docker/Dockerfile
Normal file
|
@ -0,0 +1,23 @@
|
|||
FROM oven/bun:debian AS build
|
||||
WORKDIR /app
|
||||
|
||||
RUN apt-get update -y && apt-get install nodejs -y
|
||||
|
||||
ENV NODE_ENV=production
|
||||
|
||||
COPY package.json bun.lock ./
|
||||
RUN bun install --frozen-lockfile
|
||||
|
||||
COPY . .
|
||||
RUN bun run build
|
||||
|
||||
FROM nginx:alpine AS production
|
||||
|
||||
RUN rm /etc/nginx/conf.d/default.conf
|
||||
COPY .docker/casino.conf /etc/nginx/templates/nginx.conf.template
|
||||
COPY .docker/entrypoint.sh /docker-entrypoint.d/40-custom-config-env.sh
|
||||
|
||||
COPY --from=build /app/dist/casino /usr/share/nginx/html
|
||||
|
||||
EXPOSE 80
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
Reference in a new issue