-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
78 lines (72 loc) 路 1.95 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
name: airbroke
services:
db:
image: postgres:16-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:/var/lib/postgresql/data
- ./prisma/pg-init-scripts:/docker-entrypoint-initdb.d
ports:
- 5460:5432
networks:
- airbroke
nextbase:
build:
context: '.'
dockerfile: Dockerfile.dev
image: icoretech/airbroke:latest
command: yarn install
volumes:
- .:/app
- npm_cache:/root/.npm
- yarn_cache:/usr/local/share/.cache/yarn
# - next_cache:/app/.next/cache
networks:
- airbroke
depends_on:
db:
condition: service_started
web:
extends: nextbase
command: yarn 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
depends_on:
nextbase:
condition: service_completed_successfully
# healthcheck:
# test: ['CMD', 'curl', '-f', 'http://localhost:3000/api/hc']
# interval: 30s
# timeout: 2s
# retries: 3
# 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:
npm_cache:
yarn_cache:
next_cache:
test_next_data:
networks:
airbroke:
name: airbroke