-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdocker-compose.yml
79 lines (72 loc) · 1.87 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
name: airbroke
x-healthcheck-postgres: &postgres_healthcheck
test: ['CMD-SHELL', 'pg_isready -U postgres']
interval: 10s
timeout: 5s
retries: 5
services:
db:
image: bitnami/postgresql:17
# command: postgres -c 'shared_buffers=128MB'
environment:
POSTGRESQL_PASSWORD: airbroke
POSTGRESQL_DATABASE: airbroke_development
POSTGRESQL_MAX_CONNECTIONS: 23
volumes:
- db_data_bitnami_17:/bitnami/postgresql
# - ./prisma/pg-init-scripts:/docker-entrypoint-initdb.d
ports:
- 5460:5432
networks:
- airbroke
healthcheck: *postgres_healthcheck
testdb:
image: bitnami/postgresql:17
# command: postgres -c 'shared_buffers=128MB'
environment:
POSTGRESQL_PASSWORD: airbroke
POSTGRESQL_DATABASE: airbroke_test
POSTGRESQL_MAX_CONNECTIONS: 23
networks:
- airbroke
healthcheck: *postgres_healthcheck
web:
build:
context: '.'
dockerfile: Dockerfile.dev
image: icoretech/airbroke:develop
restart: always
environment:
DATABASE_URL: 'postgresql://postgres:airbroke@db/airbroke_development?connection_limit=8&connection_timeout=5'
DIRECT_URL: 'postgresql://postgres:airbroke@db/airbroke_development'
ports:
- 3000:3000
networks:
- airbroke
depends_on:
db:
condition: service_healthy
volumes:
- .:/app
test:
image: icoretech/airbroke:develop
command: yarn test
restart: always
environment:
DATABASE_URL: 'postgresql://postgres:airbroke@testdb/airbroke_test?connection_limit=15'
DIRECT_URL: 'postgresql://postgres:airbroke@testdb/airbroke_test'
TESTING: 'true'
volumes:
- .:/app
networks:
- airbroke
depends_on:
testdb:
condition: service_healthy
volumes:
db_data_bitnami_17:
npm_cache:
yarn_cache:
networks:
airbroke:
name: airbroke