-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
42 lines (38 loc) · 846 Bytes
/
docker-compose.yml
File metadata and controls
42 lines (38 loc) · 846 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
services:
server:
build:
context: .
develop:
watch:
- action: rebuild
path: ./src
restart: unless-stopped
ports:
- 9090:9090
environment:
MYSQL_HOST: ${MYSQL_HOST}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASS: ${MYSQL_PASS}
MYSQL_PORT: ${MYSQL_PORT}
networks:
- backend
depends_on:
- database
database:
image: mysql:8
restart: unless-stopped
hostname: ${MYSQL_HOST}
environment:
MYSQL_DATABASE: internship # hardcoded here since it's hardcoded in the server code
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASS}
MYSQL_TCP_PORT: ${MYSQL_PORT}
MYSQL_RANDOM_ROOT_PASSWORD: "yes"
volumes:
- mysql-data:/var/lib/mysql
networks:
- backend
networks:
backend:
volumes:
mysql-data: