generated from CDCgov/template
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enables dev environment to be spun up with `docker compose -f dev-env.yaml up` enables automatic rebuilding on changes and doesn't require environment setup
- Loading branch information
Showing
3 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM python:3.10-bullseye | ||
|
||
|
||
RUN apt-get update && apt-get install ffmpeg libsm6 libxext6 -y | ||
|
||
RUN pip install poetry | ||
|
||
COPY ./pyproject.toml /ocr/pyproject.toml | ||
COPY ./poetry.lock /ocr/poetry.lock | ||
|
||
WORKDIR /ocr | ||
RUN poetry install | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
services: | ||
ocr: | ||
build: | ||
context: . | ||
dockerfile: dev-dockerfile | ||
ports: | ||
- "8000:8000" | ||
volumes: | ||
- .:/ocr | ||
restart: no | ||
command: "/bin/sh -c 'poetry install && poetry run fastapi dev ocr/api.py --host 0.0.0.0 --port 8000'" | ||
frontend: | ||
build: | ||
context: ./frontend | ||
dockerfile: dev-dockerfile | ||
ports: | ||
- "5173:5173" | ||
volumes: | ||
- ./frontend:/app | ||
restart: no | ||
command: "/bin/sh -c 'npm install && npm run dev -- --host'" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM node:20.17.0-alpine3.20 | ||
|
||
RUN apk add --update nodejs npm | ||
|
||
|
||
COPY . /app | ||
|
||
WORKDIR /app | ||
RUN npm install | ||
|
||
|
||
# CMD npm run dev -- --host | ||
CMD vite |