-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathdocker-compose.yml
52 lines (47 loc) · 1.31 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
networks:
default:
external: true
name: dev-local
volumes:
postgres_db: {}
services:
# postgres database
postgres:
image: postgres:14.1-alpine
container_name: postgres
hostname: postgres
healthcheck:
test: pg_isready -U main
interval: 10s
timeout: 5s
retries: 5
ports:
- '5432:5432'
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
volumes:
# state will be retained unless "-v" is used when tearing things down (docker-compose down -v)
- postgres_db:/var/lib/postgresql/data
# initialize the tables necessary for mockdata
- ./init/create_tables.sql:/docker-entrypoint-initdb.d/create_tables.sql
# required for the kafka connector to read
command: [ "postgres", "-c", "wal_level=logical" ]
restart: always
# postgres administration tool to interact with database
pgadmin4:
image: dpage/pgadmin4
container_name: pgadmin4
hostname: pgadmin4
ports:
- "5433:80"
environment:
PGADMIN_DEFAULT_EMAIL: [email protected]
PGADMIN_DEFAULT_PASSWORD: root
volumes:
# override servers.json file with ours that is already pointed at our postgres instance
- ./init/servers.json:/pgadmin4/servers.json
restart: always
#volumes:
# db:
# driver: local