added docker-compose.yml

parent fc8aaea7
version: '3'
services:
app:
build:
context: .
dockerfile: Dockerfile
image: fast_api:1.0
restart: always
ports:
- "${APP_PORT}:8000"
networks:
- fastapinetwork
volumes:
- .:/app
command: bash -c "poetry run python3 src/app/main.py"
depends_on:
- postgres
postgres:
image: postgres:14-alpine
volumes:
- ./data/postgres:/var/lib/postgresql/data/
environment:
- POSTGRES_PASSWORD=${DB_PASSWORD}
ports:
- "${DB_PORT}:5432"
networks:
- fastapinetwork
networks:
fastapinetwork:
driver: bridge
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment