-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
57 lines (54 loc) · 1.42 KB
/
docker-compose.yml
File metadata and controls
57 lines (54 loc) · 1.42 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
services:
# MySQL Database
mysql:
image: mysql:8.0
container_name: puredubstep-mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD:-root}
MYSQL_DATABASE: puredubstep
ports:
- "3306:3306"
volumes:
- mysql_data:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 10s
timeout: 5s
retries: 5
# Spring Boot Backend
backend:
build:
context: ./PureDubstep
dockerfile: Dockerfile
container_name: puredubstep-backend
restart: always
environment:
SPRING_DATASOURCE_URL: jdbc:mysql://mysql:3306/puredubstep?createDatabaseIfNotExist=true&useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=UTC
SPRING_DATASOURCE_USERNAME: root
SPRING_DATASOURCE_PASSWORD: ${DB_PASSWORD:-root}
JWT_SECRET: ${JWT_SECRET:-puredubstep-secret-key-for-jwt-token-generation-must-be-at-least-256-bits-long}
SERVER_PORT: 8080
ports:
- "8080:8080"
volumes:
- uploads:/app/uploads
depends_on:
mysql:
condition: service_healthy
# React Frontend
frontend:
build:
context: ./pure-dubstep-client
dockerfile: Dockerfile
container_name: puredubstep-frontend
restart: always
ports:
- "80:80"
volumes:
- uploads:/usr/share/nginx/html/uploads
depends_on:
- backend
volumes:
mysql_data:
uploads: