-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
56 lines (50 loc) · 1.29 KB
/
docker-compose.yml
File metadata and controls
56 lines (50 loc) · 1.29 KB
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
version: "3.8"
services:
learning-py-app:
build:
context: ./
dockerfile: .docker/Dockerfile
restart: unless-stopped
container_name: learning-py-app
tty: true
working_dir: /var/www/html/
depends_on:
- learning-py-db
volumes:
- ./:/var/www/html
networks:
- learnpynetwork
learning-py-db:
image: postgres:15-alpine
container_name: learning-py-db
restart: unless-stopped
volumes:
- pgsqldata:/var/lib/postgresql/data:rw
environment:
- "POSTGRES_DB=${DB_DATABASE}"
- "POSTGRES_USER=${DB_USERNAME}"
- "POSTGRES_PASSWORD=${DB_PASSWORD}"
ports:
- "5432:5432"
networks:
- learnpynetwork
learning-py-nginx:
image: nginx:alpine
container_name: learning-py-nginx
restart: unless-stopped
tty: true
ports:
- "${LOCAL_PORT:-8000}:80"
- "${LOCAL_SECURE_PORT:-8443}:443"
volumes:
- ./.docker/conf/certs/learning-py.com.crt:/etc/ssl/certs/mycert.crt # Usable only for Local Dev
- ./.docker/conf/certs/learning-py.com.key:/etc/ssl/private/mycert.key # Usable only for Local Dev
- ./.docker/conf/nginx:/etc/nginx/conf.d
- ./:/var/www/html
networks:
- learnpynetwork
networks:
learnpynetwork:
driver: bridge
volumes:
pgsqldata: