Include frontend in container
This commit is contained in:
parent
85c4ac36a7
commit
041f7c1ac9
2 changed files with 13 additions and 13 deletions
13
Dockerfile
13
Dockerfile
|
@ -1,3 +1,11 @@
|
|||
# Build frontend
|
||||
FROM node:22-alpine AS frontend-builder
|
||||
|
||||
COPY frontend /usr/src/frontend
|
||||
WORKDIR /usr/src/frontend
|
||||
RUN npm ci
|
||||
RUN npm run build
|
||||
|
||||
# `python-base` sets up all our shared environment variables
|
||||
FROM python:3.13-slim AS python-base
|
||||
|
||||
|
@ -52,11 +60,16 @@ RUN poetry install
|
|||
|
||||
# `production` image used for runtime
|
||||
FROM python-base AS production
|
||||
|
||||
ENV FASTAPI_ENV=production
|
||||
|
||||
COPY --from=builder-base $PYSETUP_PATH $PYSETUP_PATH
|
||||
COPY backend/alembic.ini /usr/src/
|
||||
COPY start.sh /usr/src/
|
||||
COPY backend/alembic /usr/src/alembic
|
||||
COPY backend/app /usr/src/app
|
||||
|
||||
COPY --from=frontend-builder /usr/src/frontend/build /usr/src/static
|
||||
|
||||
WORKDIR /usr/src
|
||||
CMD ["bash", "start.sh"]
|
Loading…
Add table
Add a link
Reference in a new issue