-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
46 lines (42 loc) · 976 Bytes
/
docker-compose.yml
File metadata and controls
46 lines (42 loc) · 976 Bytes
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
version: "3.7"
services:
backend:
build: .
container_name: backend_example
restart: always
ports:
- 8080:8080
environment:
- PORT=8080
- LOGLEVEL=DEBUG
- PYTHONPATH=/app:/app/app
- SQLALCHEMY_DATABASE_URL=postgresql+psycopg2://${PG_USER}:${PG_PASSWORD}@pg_example:5432/${PG_DB}
depends_on:
- postgres
postgres:
image: postgres:11.5
container_name: pg_example
volumes:
- db:/var/lib/postgresql/data
ports:
- 5432:5432
environment:
- POSTGRES_USER=${PG_USER}
- POSTGRES_PASSWORD=${PG_PASSWORD}
- POSTGRES_DB=${PG_DB}
restart: unless-stopped
nginx-proxy:
build: ./docker/nginx
container_name: nginx_proxy_example
restart: always
ports:
- 80:80
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- /var/log/nginx:/var/log/nginx
depends_on:
- backend
volumes:
db:
name: pg_example_db
driver: local