diff --git a/development.Dockerfile b/development.Dockerfile new file mode 100644 index 0000000..ad25d10 --- /dev/null +++ b/development.Dockerfile @@ -0,0 +1,2 @@ +# Base image +FROM python:3.10 diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..0808fbb --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,26 @@ +services: + service: + container_name: service + build: + context: . + dockerfile: development.Dockerfile + command: | + bash -c " + # Create the virtual environment + python3.10 -m venv .venv && + # Activate the virtual environment + source .venv/bin/activate && + # Install the dependencies + pip install -r requirements.txt -r requirements-all.txt && + # Run the service + cd src && + uvicorn --reload --host 0.0.0.0 --port 9090 main:app + " + environment: + - ENGINE_URLS=["http://host.docker.internal:8080"] + - SERVICE_URL=http://host.docker.internal:9090 + ports: + - 9090:9090 + working_dir: /workspaces/service + volumes: + - .:/workspaces/service