-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
69 lines (64 loc) · 1.72 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
name: airbroke
services:
db:
image: postgres:17-alpine
command: postgres -c 'max_connections=23' -c 'shared_buffers=128MB'
environment:
- POSTGRES_PASSWORD=airbroke
- POSTGRES_MULTIPLE_DATABASES="airbroke_development","airbroke_test"
volumes:
- db_data_17:/var/lib/postgresql/data
- ./prisma/pg-init-scripts:/docker-entrypoint-initdb.d
ports:
- 5460:5432
networks:
- airbroke
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U postgres']
interval: 10s
timeout: 5s
retries: 5
web:
build:
context: '.'
dockerfile: Dockerfile.dev
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
- npm_cache:/root/.npm
- yarn_cache:/root/.yarn
# - next_cache:/app/.next/cache
# test:
# extends: nextbase
# command: yarn test
# restart: always
# environment:
# DATABASE_URL: 'postgresql://postgres:airbroke@db/airbroke_test?connection_limit=15'
# DIRECT_URL: 'postgresql://postgres:airbroke@db/airbroke_test?connection_limit=15'
# volumes:
# - .:/app
# - npm_cache:/root/.npm
# - yarn_cache:/usr/local/share/.cache/yarn
# - test_next_cache:/app/.next
# depends_on:
# nextbase:
# condition: service_completed_successfully
volumes:
db_data_17:
npm_cache:
yarn_cache:
# next_cache:
# test_next_data:
networks:
airbroke:
name: airbroke