-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
44 lines (40 loc) · 934 Bytes
/
docker-compose.yml
File metadata and controls
44 lines (40 loc) · 934 Bytes
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
version: '3.8'
services:
db:
image: mysql:8.0
container_name: my-mysql
restart: unless-stopped
env_file:
- /home/ubuntu/docker-env.env
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: mydb
TZ: 'Asia/Seoul'
ports:
- "3306:3306"
volumes:
- db_data:/var/lib/mysql
app:
image: ggamnunq/umc:backend
container_name: spring-app
restart: always
depends_on:
- db
environment:
SPRING_DATASOURCE_URL: jdbc:mysql://my-mysql:3306/mydb
SPRING_DATASOURCE_USERNAME: ${SPRING_DATASOURCE_USERNAME}
SPRING_DATASOURCE_PASSWORD: ${SPRING_DATASOURCE_PASSWORD}
ports:
- "8080:8080"
nginx:
image: ggamnunq/umc:nginx
container_name: my-nginx
restart: always
ports:
- "80:80"
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
depends_on:
- app
volumes:
db_data: