Last active
January 9, 2017 03:19
-
-
Save rankun203/d3a36d0774eb1b5c48e009cd5ef2d64c to your computer and use it in GitHub Desktop.
Docker compose file for mysql web and update-db scripts. https://github.com/abh/ntppool/blob/master/docker-compose.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
services: | |
mysql: | |
image: mariadb:10.0 | |
volumes: | |
- "./.data/db:/var/lib/mysql" | |
restart: always | |
environment: | |
MYSQL_ROOT_PASSWORD: root | |
MYSQL_DATABASE: ntppool | |
MYSQL_USER: ntppool | |
MYSQL_PASSWORD: pooldev | |
update-db: | |
image: quay.io/ntppool/app-base:master | |
volumes: | |
- .:/ntppool | |
command: sh ./bin/initialize_schema | |
environment: | |
- DB= | |
depends_on: | |
- mysql | |
links: | |
- mysql | |
web: | |
image: quay.io/ntppool/app-base:master | |
command: ./docker-run | |
volumes: | |
- .:/ntppool | |
ports: | |
- "8299:8299" | |
depends_on: | |
- mysql | |
- update-db | |
links: | |
- mysql |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Backup all running containers data to current folder. | |
docker ps -q | xargs docker inspect | grep -o "/var/lib/docker/[^/]*/[^/]*" | xargs -i cp -r {} . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment