-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
97 lines (91 loc) · 2.17 KB
/
docker-compose.yaml
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
91
92
93
94
95
96
97
version: "3.8"
services:
backend:
container_name: backend
build:
context: ./backend
dockerfile: Dockerfile.dev
environment:
NODE_ENV: development
develop:
watch:
- path: ./backend/package.json
target: /app
action: rebuild
- path: ./backend/pnpm-lock.yaml
target: /app
action: rebuild
- path: ./backend
target: /app
action: sync
healthcheck:
test: 'curl --fail --request POST --header ''content-type: application/json'' --url ''http://localhost:4000'' --data ''{"query":"query { __typename }"}'' || exit 1'
retries: 10
depends_on:
db:
condition: service_healthy
ports:
- 4000:4000
frontend:
container_name: frontend
build:
context: ./frontend
dockerfile: Dockerfile.dev
env_file: .env.dev
environment:
NODE_ENV: development
develop:
watch:
- path: ./frontend/package.json
target: /app
action: rebuild
- path: ./frontend/pnpm-lock.yaml
target: /app
action: rebuild
- path: ./frontend/next.config.js
target: /app
action: rebuild
- path: ./frontend
target: /app
action: sync
depends_on:
backend:
condition: service_healthy
ports:
- 3000:3000
imagesupload:
build:
context: ./imagesupload
dockerfile: Dockerfile.dev
develop:
watch:
- path: ./imagesupload/package.json
target: /app
action: rebuild
- path: ./imagesupload/pnpm-lock.yaml
target: /app
action: rebuild
- path: ./imagesupload/src
target: /app/src
action: sync
volumes:
- ./imagesupload/uploads:/app/uploads
ports:
- 8000:8000
adminer:
image: adminer
ports:
- 8080:8080
db:
image: postgres
container_name: db
restart: always
environment:
POSTGRES_PASSWORD: wildrent
healthcheck:
test: [ "CMD-SHELL", "pg_isready -d postgres -U postgres" ]
retries: 10
volumes:
- pgdata:/var/lib/postgresql/data
volumes:
pgdata: