-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
83 lines (76 loc) · 1.72 KB
/
docker-compose.yaml
File metadata and controls
83 lines (76 loc) · 1.72 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
version: '3.8'
services:
web:
build:
context: .
dockerfile: docker/nginx/Dockerfile
ports:
- "127.0.0.1:9000:80"
volumes:
- .:/app
networks:
- pg-network
depends_on:
php:
condition: service_started
db:
condition: service_healthy
db:
image: postgres:15-alpine
environment:
POSTGRES_DB: ${PG_DB}
POSTGRES_USER: ${PG_USER}
POSTGRES_PASSWORD: ${PG_PASSWORD}
volumes:
- pg-data:/var/lib/postgresql/data
- ./docker/db/init.sql:/docker-entrypoint-initdb.d/init.sql
networks:
- pg-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${PG_USER} -d ${PG_DB}"]
interval: 5s
timeout: 5s
retries: 5
php:
build:
context: .
dockerfile: docker/php/Dockerfile
volumes:
- .:/app
environment:
PG_DB: ${PG_DB}
PG_USER: ${PG_USER}
PG_PASSWORD: ${PG_PASSWORD}
PG_HOST: db
CONTENT_SERVICE_KEY: ${CONTENT_SERVICE_KEY}
CONTENT_SERVICE_URL: http://content-service:8000
networks:
- pg-network
- app-network
depends_on:
db:
condition: service_healthy
pgadmin-programmar:
image: dpage/pgadmin4:latest
container_name: pg-admin2
environment:
PGADMIN_DEFAULT_EMAIL: ${PG_EMAIL}
PGADMIN_DEFAULT_PASSWORD: ${PG_PASSWORD}
ports:
- "127.0.0.1:9002:80"
networks:
- pg-network
content-service:
build: ./ProgrammarContentService
environment:
CONTENT_SERVICE_KEY: ${CONTENT_SERVICE_KEY}
volumes:
- ./ProgrammarContentService/data:/app/data
networks:
- app-network
networks:
app-network:
driver: bridge
pg-network:
volumes:
pg-data: