-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
65 lines (59 loc) · 1.29 KB
/
docker-compose.yml
File metadata and controls
65 lines (59 loc) · 1.29 KB
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
services:
db:
image: mysql:8.0
container_name: mysql_logistics_api
restart: always
environment:
MYSQL_ROOT_PASSWORD: ${DATABASE_PASSWORD}
MYSQL_DATABASE: ${DATABASE_NAME}
ports:
- "${DATABASE_PORT}:3306"
volumes:
- mysql_data:/var/lib/mysql
networks:
- logistics_net
redis:
image: redis:alpine
container_name: redis_logistics_api
restart: always
command: redis-server --requirepass ${REDIS_PASSWORD}
ports:
- ${REDIS_PORT}:6379
networks:
- logistics_net
phpmyadmin:
image: phpmyadmin:latest
container_name: pma_logistics_api
restart: always
environment:
PMA_HOST: db
ports:
- "${PMA_PORT}:80"
depends_on:
- db
networks:
- logistics_net
api_node:
build:
context: .
dockerfile: Dockerfile
container_name: api_logistics_api
restart: always
ports:
- "${API_PORT}:5000"
environment:
- API_PORT=5000
- DATABASE_URL=mysql://root:${DATABASE_PASSWORD}@db:3306/${DATABASE_NAME}
- REDIS_HOST=redis
- REDIS_PORT=${REDIS_PORT}
- REDIS_PASSWORD=${REDIS_PASSWORD}
depends_on:
- db
- redis
networks:
- logistics_net
volumes:
mysql_data:
networks:
logistics_net:
driver: bridge