-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
46 lines (44 loc) · 977 Bytes
/
docker-compose.yml
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
version: "3.7"
services:
# MySQL Database
learnit-db:
image: mariadb:latest
command:
[
"mysqld",
"--character-set-server=utf8",
"--collation-server=utf8_unicode_ci",
]
volumes:
- learnit-data:/var/lib/mysql
ports:
- "3306:3306"
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_DATABASE=${MYSQL_DATABASE}
# API Server
learnit-server:
build: ./server
ports:
- "8000:8000"
environment:
- PORT=${PORT}
- JWT_SECRET=${JWT_SECRET}
- DB_HOST=${DB_HOST}
- DB_PORT=${DB_PORT}
- DB_NAME=${DB_NAME}
- DB_USER=${DB_USER}
- DB_PASSWORD=${DB_PASSWORD}
depends_on:
- learnit-db
# Client
learnit-client:
image: node:10.15-alpine
command: /bin/sh -c 'cd client && npm i && npm run dev;'
ports:
- "3000:3000"
volumes:
- ./client:/client
# Volumes Configuration
volumes:
learnit-data: