Skip to content

Commit

Permalink
Add Dockerfile and docker-compose.yml files to improve local developm…
Browse files Browse the repository at this point in the history
…ent experience
  • Loading branch information
ludelafo committed Jan 31, 2024
1 parent 40c55e9 commit 0ed37bd
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
2 changes: 2 additions & 0 deletions development.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Base image
FROM python:3.10
26 changes: 26 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 0ed37bd

Please sign in to comment.