DockerImage

This commit is contained in:
penner 2023-09-16 21:57:19 +00:00
parent 776298a357
commit 2d864dd57f
2 changed files with 45 additions and 0 deletions

27
.dockerignore Normal file
View file

@ -0,0 +1,27 @@
# commonly found
**/.git
**/.idea
**/.DS_Store
**/.vscode
**/.devcontainer
**/dist
**/.gitignore
**/Dockerfile
**/.dockerignore
# found in python and JS dirs
**/__pycache__
**/node_modules
**/.pytest_cache
# env files
**/.env
**/.env.local
**/.env.*.local
# log files
**/npm-debug.log*
**/yarn-debug.log*
**/yarn-error.log*
**/pnpm-debug.log*

18
Dockerfile Normal file
View file

@ -0,0 +1,18 @@
FROM node:lts AS uibuild
WORKDIR /usr/src/app
COPY ui/package*.json ui/yarn*.lock ./
RUN yarn --production=false
COPY ui ./
RUN yarn build
FROM tiangolo/uvicorn-gunicorn:python3.11-slim
WORKDIR /usr/src/app
ENV \
PRODUCTION_MODE="true" \
APP_MODULE="advent22_api.app:app"
COPY api ./
RUN python -m pip --no-cache-dir install ./
COPY --from=uibuild /usr/src/app/dist /html