-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
54 lines (51 loc) · 1.31 KB
/
Copy pathdocker-compose.yml
File metadata and controls
54 lines (51 loc) · 1.31 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
services:
mysql:
image: mysql:8.4
restart: unless-stopped
environment:
MYSQL_DATABASE: ${DB_NAME:-alumni_postcards}
MYSQL_USER: ${DB_USER:-alumni}
MYSQL_PASSWORD: ${DB_PASSWORD:-alumni}
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD:-root}
volumes:
- mysql_data:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 10s
timeout: 5s
retries: 5
backend:
build:
context: .
dockerfile: docker/backend.Dockerfile
restart: unless-stopped
env_file:
- .env
environment:
DB_HOST: mysql
DB_PORT: 3306
HOST: 0.0.0.0
PUBLIC_URL: ${PUBLIC_URL:-http://postcards.localhost}
CLIENT_URLS: ${CLIENT_URLS:-http://postcards.localhost}
ADMIN_URLS: ${ADMIN_URLS:-http://admin.postcards.localhost}
UPLOAD_DIR: /app/backend/uploads
volumes:
- uploads:/app/backend/uploads
depends_on:
mysql:
condition: service_healthy
web:
build:
context: .
dockerfile: docker/web.Dockerfile
args:
VITE_API_BASE_URL: ${VITE_API_BASE_URL:-/api}
VITE_UPLOAD_BASE_URL: ${VITE_UPLOAD_BASE_URL:-/uploads}
restart: unless-stopped
ports:
- "80:80"
depends_on:
- backend
volumes:
mysql_data:
uploads: