-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
55 lines (48 loc) · 1.59 KB
/
Copy pathdocker-compose.yml
File metadata and controls
55 lines (48 loc) · 1.59 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
version: '3.8'
services:
# 1. The Database
mysql-db:
image: mysql:8.0
container_name: splendid-mysql
environment:
MYSQL_DATABASE: ${DB_NAME}
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
ports:
- "3307:3306"
volumes:
- db_data:/var/lib/mysql
# 2. Spring Boot Backend
backend:
image: splendid-backend:v1
container_name: splendid-backend-app
ports:
- "8080:8080"
depends_on:
- mysql-db
environment:
APP_LOGO_URL: "https://res.cloudinary.com/dmht8yyea/image/upload/q_auto/f_auto/v1777136456/splendid_hqpges.png"
SPRING_DATASOURCE_URL: jdbc:mysql://mysql-db:3306/${DB_NAME}?useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true
SPRING_DATASOURCE_USERNAME: ${DB_USER}
SPRING_DATASOURCE_PASSWORD: ${DB_ROOT_PASSWORD}
JWT_SECRET: ${JWT_SECRET}
SENDGRID_API_KEY: ${SENDGRID_API_KEY}
CLOUDINARY_CLOUD_NAME: ${CLOUDINARY_CLOUD_NAME}
CLOUDINARY_API_KEY: ${CLOUDINARY_API_KEY}
CLOUDINARY_API_SECRET: ${CLOUDINARY_API_SECRET}
PAYHERE_MERCHANT_ID: ${PAYHERE_MERCHANT_ID}
PAYHERE_MERCHANT_SECRET: ${PAYHERE_MERCHANT_SECRET}
# 3. React/Vite Frontend
frontend:
build:
context: ./splendid-frontend/splendid
args:
- VITE_API_URL=http://56.228.23.20:8080
image: splendid-frontend:v1
container_name: splendid-frontend-app
ports:
- "3000:80" # This maps your browser's localhost:3000 to the NGINX port 80
depends_on:
- backend
# This volume ensures your database data isn't wiped out when the container stops
volumes:
db_data: