1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-08-05 13:35:23 +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:
Hayden 2022-12-31 10:01:15 -08:00 committed by GitHub
parent c4eebaccca
commit e281f53488
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 366 additions and 127 deletions

View file

@ -1,46 +0,0 @@
{
auto_https off
admin off
}
:3000 {
@apidocs path /docs /openapi.json
@static {
file
path *.ico *.css *.js *.gif *.jpg *.jpeg *.png *.svg *.woff *.woff2 *.webp
}
encode gzip zstd
# Handles Recipe Images / Assets
handle_path /api/media/recipes/* {
header @static Cache-Control max-age=31536000
root * /app/data/recipes/
file_server
}
# Handles User Images
handle_path /api/media/users/* {
header @static Cache-Control max-age=31536000
root * /app/data/users/
file_server
}
# Handle Docker Volume Validation File
handle_path /api/media/docker/* {
root * /app/data/docker-validation/
file_server
}
handle @apidocs {
uri strip_suffix /
reverse_proxy {$API_URL}
}
handle {
uri strip_suffix /
reverse_proxy http://127.0.0.1:3001
}
}

View file

@ -1,38 +0,0 @@
FROM node:16 as builder
WORKDIR /app
COPY . .
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 ./Caddyfile /app/
ENV HOST 0.0.0.0
EXPOSE 3000
RUN chmod +x /app/run.sh
ENTRYPOINT /app/run.sh

View file

@ -1,7 +0,0 @@
# Production entry point for the frontend docker container
# Web Server
caddy start --config /app/Caddyfile
# Start Node Application
yarn start -p 3001