dynamicweb/docker-compose.yml

43 lines
830 B
YAML
Raw Normal View History

version: '3'
2023-07-31 05:11:05 +00:00
services:
# Django app service
2023-07-31 05:11:05 +00:00
web:
build:
context: .
2023-07-31 05:11:05 +00:00
dockerfile: Dockerfile
container_name: dynamicweb
command: python manage.py runserver 0.0.0.0:8000
2023-07-31 05:11:05 +00:00
volumes:
- .:/app
ports:
- "8000:8000"
2023-07-31 05:11:05 +00:00
depends_on:
- db
# PostgreSQL database service
2023-07-31 05:11:05 +00:00
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
2023-07-31 05:11:05 +00:00
volumes:
- postgres_data:/var/lib/postgresql/data
# Nginx service
2023-07-31 05:11:05 +00:00
nginx:
image: nginx:latest
container_name: my_nginx_server
2023-07-31 05:11:05 +00:00
volumes:
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf
2023-07-31 05:11:05 +00:00
ports:
- "80:80"
2023-07-31 05:11:05 +00:00
depends_on:
- web
volumes:
postgres_data: