-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yaml
More file actions
138 lines (132 loc) · 3.04 KB
/
docker-compose.dev.yaml
File metadata and controls
138 lines (132 loc) · 3.04 KB
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
services:
db_dev:
image: postgres:17-alpine
container_name: notetify-db-dev
networks:
- notetify-net-dev
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres"]
interval: 10s
timeout: 10s
retries: 10
start_period: 10s
restart: unless-stopped
user: postgres
secrets:
- db-password
volumes:
- db-data-dev:/var/lib/postgresql/data
environment:
- POSTGRES_DB=notetify
- POSTGRES_PASSWORD_FILE=/run/secrets/db-password
expose:
- 5432
ports:
- "5432:5432"
env_file:
- .env.development
redis_dev:
image: redis:8.0.1-alpine
container_name: notetify-redis-cache-dev
networks:
- notetify-net-dev
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 10
start_period: 5s
restart: unless-stopped
depends_on:
db_dev:
condition: service_healthy
volumes:
- redis-data-dev:/data
expose:
- 6379
ports:
- "6379:6379"
env_file:
- .env.development
api_dev:
build:
context: ./api
dockerfile: Dockerfile
target: development
container_name: notetify-api-dev
networks:
- notetify-net-dev
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:80/api/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
depends_on:
db_dev:
condition: service_healthy
redis_dev:
condition: service_healthy
secrets:
- db-password
volumes:
- ./api:/app
- api_vendor_dev:/app/vendor
- api_storage_dev:/app/storage
ports:
- "8000:80"
environment:
- DB_HOST=db_dev
- DB_PORT=5432
- DB_DATABASE=notetify
- DB_USERNAME=postgres
- REDIS_HOST=redis_dev
- REDIS_PORT=6379
- APP_ENV=local
- APP_DEBUG=true
env_file:
- .env.development
client_dev:
build:
context: ./client
dockerfile: Dockerfile
target: development
args:
- VITE_BASE_URL=http://localhost:8000/api/
- VITE_WS_ORIGIN=ws://localhost:8000
- VITE_APP_NAME=Notetify
- VITE_CLIENT_URL=http://localhost:3000/
container_name: notetify-client-dev
networks:
- notetify-net-dev
restart: unless-stopped
depends_on:
api_dev:
condition: service_healthy
volumes:
- ./client:/usr/src/app
- node_modules_client_dev:/usr/src/app/node_modules
ports:
- "3000:3000"
environment:
- VITE_BASE_URL=http://localhost:8000/api/
- VITE_WS_ORIGIN=ws://localhost:8000
- VITE_APP_NAME=Notetify
- VITE_CLIENT_URL=http://localhost:3000/
env_file:
- .env.development
stdin_open: true
tty: true
networks:
notetify-net-dev:
driver: bridge
volumes:
redis-data-dev:
db-data-dev:
node_modules_client_dev:
api_vendor_dev:
api_storage_dev:
secrets:
db-password:
file: db/password.txt