-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
42 lines (40 loc) · 928 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
version: "3.6"
services:
blogapi:
restart: always
build:
context: ./
dockerfile: dockerfile
image: blogapi
container_name: blogapi
ports:
- 8081:8080
volumes:
- ./logs/api:/blog/log
mysql:
network_mode: "bridge"
command:
--default-authentication-plugin=mysql_native_password
environment:
MYSQL_ROOT_PASSWORD: "123456"
MYSQL_USER: 'test'
MYSQL_PASS: '123456'
image: "mysql"
container_name: "mysql_1"
restart: always
ports:
- "3306:3306"
volumes:
- "./mysql/data/db:/var/lib/mysql"
- "./mysql/data/conf:/etc/mysql/conf.d"
redis:
image: redis:latest
container_name: redis
restart: always
ports:
- 8100:8100
volumes:
- ./redis.conf:/usr/local/etc/redis/redis.conf:rw
- ./data:/data:rw
command:
/bin/bash -c "redis-server /usr/local/etc/redis/redis.conf "