-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
71 lines (67 loc) · 1.59 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
services:
kulinarna-app:
build: ./app
container_name: kulinarna-app
hostname: kulinarna-app
ports:
- 3000:3000
image: kulinarna-app
depends_on:
postgresql:
condition: service_healthy
kulinarna-server:
condition: service_started
networks:
- kulinarna_net
kulinarna-server:
build: ./server
container_name: kulinarna-server
hostname: kulinarna-server
# env_file:
# - ./server/.env
ports:
- 5000:5000
image: kulinarna-server
depends_on:
postgresql:
condition: service_healthy
environment:
- POSTGRESQL_HOST=postgresql_db
- POSTGRESQL_USERNAME=kulinarna
- POSTGRESQL_PASSWORD=admin
- POSTGRESQL_DATABASE=kulinarnabaza
- PGHOST=postgresql_db
- PGUSER=kulinarna
- PGPASSWORD=admin
- PGDATABASE=kulinarnabaza
networks:
- kulinarna_net
postgresql:
container_name: postgresql_db
hostname: postgresql_db
image: postgres:16.2-alpine
command: postgres -c 'max_connections=200'
healthcheck:
test: [ "CMD-SHELL", "pg_isready" ]
interval: 1s
timeout: 5s
retries: 10
environment:
POSTGRES_PASSWORD: admin
POSTGRES_USER: kulinarna
PGPASSWORD: admin
PGUSER: kulinarna
PGDATABASE: kulinarnabaza
ports:
- "5432:5432"
volumes:
- ./docker/postgresql:/data
- ./docker/postgresql-init:/docker-entrypoint-initdb.d
networks:
- kulinarna_net
networks:
kulinarna_net:
driver: bridge
ipam:
config:
- subnet: 192.168.10.0/24