-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
43 lines (40 loc) · 935 Bytes
/
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
version: '3.8'
services:
web:
build: .
image: ${IMAGE_APP}
command: bash -c "python manage.py collectstatic --no-input && gunicorn config.wsgi:application --bind 0.0.0.0:8000"
restart: always
env_file:
- .env
environment:
- WAIT_HOSTS:${DB_HOST}:${DB_PORT}
volumes:
- static_volume:/app/django-static/
- ./src/app/templates/posts:/app/app/templates/posts
expose:
- ${WEB_PORT_INTERNAL}
depends_on:
- db
db:
image: postgres
restart: always
environment:
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=${DB_NAME}
volumes:
- postgres_data:/var/lib/postgresql/data/
nginx:
build: ./nginx
image: ${IMAGE_NGINX}
restart: always
volumes:
- static_volume:/app/django-static/
ports:
- "80:80"
depends_on:
- web
volumes:
postgres_data:
static_volume: