-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
63 lines (59 loc) · 1.33 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
version: '3'
services:
dedi-mysql:
image: mysql
container_name: "${APP_NAME}_MYSQL"
volumes:
- $PWD/mysql:/var/lib/mysql
restart: 'always'
environment:
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
MYSQL_DATABASE: ${DB_DATABASE}
MYSQL_USER: ${DB_USER}
MYSQL_PASSWORD: ${DB_PASSWORD}
command: --default-authentication-plugin=mysql_native_password
networks:
- dedi-network
dedi-mongo:
image: mongo
container_name: "${APP_NAME}_MONGO"
environment:
MONGO_INITDB_ROOT_USERNAME: ${MONGO_USERNAME}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_PASSWORD}
volumes:
- $PWD/mongodb:/data/db
restart: 'always'
networks:
- dedi-network
dedi-redis:
image: "redis:alpine"
container_name: "${APP_NAME}_REDIS"
restart: always
networks:
- dedi-network
volumes:
- $PWD/redis:/var/lib/redis
dedi-app:
build:
context: .
dockerfile: docker/Dockerfile
restart: always
container_name: "${APP_NAME}_APP"
image: app-dedi-service
env_file:
- .env
environment:
DB_HOST: dedi-mysql
REDIS_HOST: dedi-redis
links:
- mongo
ports:
- "${PORT}:${PORT}"
depends_on:
- dedi-mysql
- dedi-redis
- dedi-mongo
networks:
- dedi-network
networks:
dedi-network: