Add the database data
This commit is contained in:
parent
e6d6427ddc
commit
b3c2ff8de0
3 changed files with 37 additions and 0 deletions
|
|
@ -15,6 +15,8 @@ services:
|
|||
disable: true
|
||||
volumes:
|
||||
- "./api:/app"
|
||||
links:
|
||||
- "db"
|
||||
|
||||
stdin_open: true
|
||||
tty: true
|
||||
|
|
@ -34,3 +36,27 @@ services:
|
|||
|
||||
stdin_open: true
|
||||
tty: true
|
||||
|
||||
db:
|
||||
build:
|
||||
context: "./database"
|
||||
docker: "dockerfile"
|
||||
restart: "unless-stopped"
|
||||
volumes:
|
||||
- "./data:/var/lib/mysql"
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: "root"
|
||||
healthcheck:
|
||||
test: "mysqladmin ping -h localhost"
|
||||
timeout: 30s
|
||||
retries: 5
|
||||
start_period: 60s
|
||||
|
||||
adminer:
|
||||
image: adminer
|
||||
ports:
|
||||
- "8081:8080"
|
||||
depends_on:
|
||||
- "db"
|
||||
links:
|
||||
- "db"
|
||||
Loading…
Add table
Add a link
Reference in a new issue