-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
53 lines (48 loc) · 1.23 KB
/
docker-compose.yml
File metadata and controls
53 lines (48 loc) · 1.23 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
version: '3.8'
services:
postgres:
image: postgres:16-alpine
container_name: spacecat-postgres-local
environment:
POSTGRES_DB: spacecatdb
POSTGRES_USER: spacecatuser
POSTGRES_PASSWORD: spacecatpassword
PGDATA: /var/lib/postgresql/data/pgdata
ports:
- "5432:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
# Increase shared memory to prevent "No space left on device" errors
shm_size: 256mb
healthcheck:
test: ["CMD-SHELL", "pg_isready -U spacecatuser -d spacecatdb"]
interval: 10s
timeout: 5s
retries: 5
networks:
- spacecat-network
# pgAdmin for database management (optional but useful)
pgadmin:
image: dpage/pgadmin4:latest
container_name: spacecat-pgadmin
environment:
PGADMIN_DEFAULT_EMAIL: admin@example.com
PGADMIN_DEFAULT_PASSWORD: admin
PGADMIN_LISTEN_PORT: 80
PGADMIN_CONFIG_CHECK_EMAIL_DELIVERABILITY: 'False'
ports:
- "5050:80"
volumes:
- pgadmin-data:/var/lib/pgadmin
networks:
- spacecat-network
depends_on:
- postgres
volumes:
postgres-data:
driver: local
pgadmin-data:
driver: local
networks:
spacecat-network:
driver: bridge