-
Notifications
You must be signed in to change notification settings - Fork 7
/
compose.dev.yaml
72 lines (68 loc) · 1.59 KB
/
compose.dev.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
services:
api:
build:
context: ./api
dockerfile: Dockerfile.dev
develop:
watch:
- action: sync
path: ./api
target: /app
- action: rebuild
path: ./api/Cargo.toml
- action: rebuild
path: ./api/Dockerfile.dev
restart: unless-stopped
depends_on:
- database
ports:
- ${API_PORT:-8080}:8080
web:
build:
context: ./web
dockerfile: Dockerfile.dev
args:
- NODE_VERSION=${NODE_VERSION:-18}
develop:
watch:
- action: sync
path: ./web
target: /app
ignore:
- node_modules/
- action: rebuild
path: ./web/package.json
- action: rebuild
path: ./web/Dockerfile.dev
ports:
- ${WEB_PORT:-3000}:5173
docs:
build:
context: ./docs
dockerfile: Dockerfile.dev
args:
- NODE_VERSION=${NODE_VERSION:-18}
develop:
watch:
- action: sync
path: ./docs
target: /app
ignore:
- node_modules/
- action: rebuild
path: ./docs/package.json
- action: rebuild
path: ./docs/Dockerfile.dev
ports:
- ${DOCS_PORT:-3001}:3001
database:
image: postgres:${POSTGRES_VERSION:-16}-alpine
environment:
- POSTGRES_DB=${POSTGRES_DB:-app}
# You should definitely change the password in production
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-root}
- POSTGRES_USER=${POSTGRES_USER:-app}
volumes:
- db_data:/var/lib/postgresql/data
volumes:
db_data: