-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
90 lines (90 loc) · 3.39 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
version: "3.2"
services:
postgres:
profiles: ["dev"]
hostname: postgres
ports:
- "5432:5432"
image: postgres:14
environment:
- POSTGRES_DB=upchieve
- POSTGRES_USER=admin
- POSTGRES_PASSWORD=Password123
command: postgres -c shared_preload_libraries=pg_stat_statements -c pg_stat_statements.track=all
volumes:
# SQL files mounted to entrypoint folder are run in alphabetical order
- ./database/db_init/schema.sql:/docker-entrypoint-initdb.d/a.sql
- ./database/db_init/auth.sql:/docker-entrypoint-initdb.d/b.sql
- ./database/db_init/local_auth.sql:/docker-entrypoint-initdb.d/c.sql
- ./database/db_init/test_seeds.sql:/docker-entrypoint-initdb.d/d.sql
- ./database/db_init/seed_migrations.sql:/docker-entrypoint-initdb.d/e.sql
- ./database/db_init/refresh_materialized_views.sql:/docker-entrypoint-initdb.d/f.sql
healthcheck:
test: ["CMD", "pg_isready", "-h", "postgres"]
interval: 1m30s
timeout: 30s
retries: 5
start_period: 30s
redis:
profiles: ["dev"]
hostname: redis
ports:
- "6379:6379"
image: redis:6.2.1
volumes:
- ./redis-volume:/data
pgadmin:
profiles: ["dev"]
image: dpage/pgadmin4
depends_on:
- postgres
entrypoint: >
/bin/sh -c "
mkdir -m 700 /var/lib/pgadmin/storage/admin_upchieve.org;
chown -R pgadmin:pgadmin /var/lib/pgadmin/storage/admin_upchieve.org;
cp -prv /pgpassfile /var/lib/pgadmin/storage/admin_upchieve.org/;
chmod 600 /var/lib/pgadmin/storage/admin_upchieve.org/pgpassfile;
/entrypoint.sh
"
ports:
- "80:80"
environment:
- PGADMIN_DEFAULT_EMAIL=admin@upchieve.org
- PGADMIN_DEFAULT_PASSWORD=Password123
volumes:
- ./pgadmin/pgpassfile:/pgpassfile
- ./pgadmin/servers.json:/pgadmin4/servers.json
restart: unless-stopped
postgres-e2e:
profiles: ["e2e"]
container_name: postgres-e2e
hostname: postgres
ports:
- "5500:5432"
image: postgres:14
environment:
- POSTGRES_DB=upchieve
- POSTGRES_USER=admin
- POSTGRES_PASSWORD=Password123
command: postgres -c shared_preload_libraries=pg_stat_statements -c pg_stat_statements.track=all
volumes:
# SQL files mounted to entrypoint folder are run in alphabetical order
- ./database/db_init/schema.sql:/docker-entrypoint-initdb.d/a.sql
- ./database/db_init/auth.sql:/docker-entrypoint-initdb.d/b.sql
- ./database/db_init/local_auth.sql:/docker-entrypoint-initdb.d/c.sql
- ./database/db_init/test_seeds.sql:/docker-entrypoint-initdb.d/d.sql
- ./database/db_init/seed_migrations.sql:/docker-entrypoint-initdb.d/e.sql
- ./database/db_init/refresh_materialized_views.sql:/docker-entrypoint-initdb.d/f.sql
healthcheck:
test: [ "CMD", "pg_isready", "-h", "postgres" ]
interval: 3s
timeout: 30s
retries: 5
start_period: 2s
redis-e2e:
profiles: ["e2e"]
container_name: redis-e2e
hostname: redis
ports:
- "5501:6379"
image: redis:6.2.1