dynamicweb/docker-compose.yml
2023-07-31 08:30:24 +00:00

42 lines
830 B
YAML

version: '3'
services:
# Django app service
web:
build:
context: .
dockerfile: Dockerfile
container_name: dynamicweb
command: python manage.py runserver 0.0.0.0:8000
volumes:
- .:/app
ports:
- "8000:8000"
depends_on:
- db
# PostgreSQL database service
db:
image: postgres:13
container_name: my_postgres_db
environment:
POSTGRES_USER: your_postgres_username
POSTGRES_PASSWORD: your_postgres_password
POSTGRES_DB: your_database_name
volumes:
- postgres_data:/var/lib/postgresql/data
# Nginx service
nginx:
image: nginx:latest
container_name: my_nginx_server
volumes:
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf
ports:
- "80:80"
depends_on:
- web
volumes:
postgres_data: