mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-08-05 21:45:25 +02:00
chore: refactor-docker-structure (#1948)
* move dockerfiles to dedicated folder * consolidate docker related files to docker dir * update CI references * experimental omni style container * update makefile commands * update references * fix whitespace * single container docs * update build paths * adds omni style build * set context
This commit is contained in:
parent
c4eebaccca
commit
e281f53488
22 changed files with 366 additions and 127 deletions
39
docker/frontend.Dockerfile
Normal file
39
docker/frontend.Dockerfile
Normal file
|
@ -0,0 +1,39 @@
|
|||
FROM node:16 as builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY ./frontend .
|
||||
|
||||
RUN yarn install \
|
||||
--prefer-offline \
|
||||
--frozen-lockfile \
|
||||
--non-interactive \
|
||||
--production=false \
|
||||
# https://github.com/docker/build-push-action/issues/471
|
||||
--network-timeout 1000000
|
||||
|
||||
RUN yarn build
|
||||
|
||||
RUN rm -rf node_modules && \
|
||||
NODE_ENV=production yarn install \
|
||||
--prefer-offline \
|
||||
--pure-lockfile \
|
||||
--non-interactive \
|
||||
--production=true
|
||||
|
||||
FROM node:16-alpine
|
||||
|
||||
RUN apk add caddy
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# copying caddy into image
|
||||
COPY --from=builder /app .
|
||||
COPY ./docker/frontend.Caddyfile /app/Caddyfile
|
||||
COPY ./docker/frontend.entry.sh /app/run.sh
|
||||
|
||||
ENV HOST 0.0.0.0
|
||||
EXPOSE 3000
|
||||
|
||||
RUN chmod +x /app/run.sh
|
||||
ENTRYPOINT /app/run.sh
|
Loading…
Add table
Add a link
Reference in a new issue