forked from dbwebb-se/microblog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
36 lines (34 loc) · 1.03 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
version: "3"
services:
prod:
image: gufo19/microblog:latest
container_name: microblog
restart: always
environment:
- SECRET_KEY=c065e2bee1a143a7be1b0321a88bfe0c
- DATABASE_URL=mysql+pymysql://microblog:password123@dbserver/microblog
depends_on:
- "mysql"
links:
- mysql:dbserver
ports:
- "8000:5000"
mysql:
image: mysql/mysql-server:5.7
container_name: mysql
restart: always
environment:
- MYSQL_RANDOM_ROOT_PASSWORD=yes
- MYSQL_DATABASE=microblog
- MYSQL_USER=microblog
- MYSQL_PASSWORD=password123
volumes:
- /home/deploy/mysql_data:/var/lib/mysql
test:
build:
# context: "./docker/Dockerfile_test"
context: .
dockerfile: ./docker/Dockerfile_test
image: microblog-test:latest
volumes:
- ./:/home/microblog/volume