-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
50 lines (45 loc) · 1.01 KB
/
docker-compose.yml
File metadata and controls
50 lines (45 loc) · 1.01 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
version: "3.9"
services:
cobol:
build: .
image: mainfreem-cobol:latest
container_name: mainfreem-cobol
stdin_open: true
tty: true
depends_on:
postgres:
condition: service_healthy
environment:
PGHOST: postgres
PGPORT: 5432
PGDATABASE: coboldb
PGUSER: cobol
PGPASSWORD: cobol123
volumes:
- ./workspace:/workspace/my-programs
networks:
- mainfreem-net
postgres:
image: postgres:16-alpine
container_name: mainfreem-postgres
restart: unless-stopped
environment:
POSTGRES_DB: coboldb
POSTGRES_USER: cobol
POSTGRES_PASSWORD: cobol123
volumes:
- postgres_data:/var/lib/postgresql/data
- ./sql/init.sql:/docker-entrypoint-initdb.d/init.sql
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U cobol -d coboldb"]
interval: 5s
timeout: 5s
retries: 10
networks:
- mainfreem-net
volumes:
postgres_data:
networks:
mainfreem-net: