-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
57 lines (53 loc) · 1.27 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
version: '3.6'
services:
database:
image: postgres:14
container_name: co-database
ports:
- ${POSTGRES_PORT:-5432}:5432
networks:
- backend
# volumes:
# - ./pg_data/data:${PGDATA:-/var/lib/postgresql/data}
# - ./pg_data/logs:${POSTGRES_INITDB_WALDIR:-/var/log/postgresql}
environment:
- POSTGRES_USER=${POSTGRES_USER:-postgres}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-postgres}
- PGDATA=${PGDATA:-/var/lib/postgresql/data}
- POSTGRES_DB=postgres
django:
build:
context: ./
dockerfile: Dockerfile
container_name: co-django
depends_on:
- database
# ports:
# - 8000:8000
networks:
- frontend
- backend
volumes:
- .:/code
- ./static:/code/static
- ./media:/code/media
environment:
- UWSGI_UID=${UWSGI_UID:-1000}
- UWSGI_GID=${UWSGI_GID:-1000}
nginx:
image: nginx:1
container_name: co-nginx
ports:
- 8080:80
- 8443:443
networks:
- frontend
volumes:
- .:/code
- ./static:/code/static
- ./media:/code/media
- ${NGINX_DEFAULT_CONF:-./nginx/default.conf}:/etc/nginx/conf.d/default.conf:ro
- ${NGINX_SSL_CERTS_DIR:-./certs}:/etc/ssl:ro
networks:
frontend:
backend: