-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
71 lines (67 loc) · 1.53 KB
/
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
version: '3'
services:
# MySQL
mysql:
image: mysql:8.0
command: mysqld --default-authentication-plugin=mysql_native_password --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
environment:
MYSQL_TCP_PORT: "${DATABASE_PORT}"
MYSQL_ROOT_PASSWORD: "${DATABASE_PASSWORD}"
MYSQL_DATABASE: "${DATABASE_DB}"
ports:
- '${DATABASE_PORT}:${DATABASE_PORT}'
# volumes:
# - mysql_data:/var/lib/mysql
# - './docker/db/my.cnf:/etc/mysql/conf.d/my.cnf'
# - './docker/db/sql:/docker-entrypoint-initdb.d'
networks:
- db
mongo:
image: mongo
restart: always
networks:
- db
api:
build:
dockerfile: Dockerfile
context: ./transaction
restart: always
environment:
DATABASE_HOST: mysql
DATABASE_PORT: ${DATABASE_PORT}
DATABASE_USER: ${DATABASE_USER}
DATABASE_DB: ${DATABASE_DB}
DATABASE_PASSWORD: ${DATABASE_PASSWORD}
MONGO_DATABASE_HOST: mongo
MONGO_DATABASE_PORT: 27017
MONGO_DATABASE_NAME: ${MONGO_DATABASE_NAME}
depends_on:
- mysql
ports:
- "81:3000"
networks:
- db
- socket
app:
build:
dockerfile: Dockerfile
context: ./my-app
restart: always
environment:
REACT_APP_SERVER: "http://localhost:81"
depends_on:
- api
networks:
- socket
ports:
- "80:3000"
networks:
db:
driver: bridge
name: db
socket:
driver: bridge
name: socket
# volumes:
# mysql_data:
# name: mysql_data