-
-
Save r37r0m0d3l/8ed282cdaf2e62d2abebce0ac7371a88 to your computer and use it in GitHub Desktop.
docker-compose with db persistence
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
| data: | |
| image: debian:jessie | |
| user: www-data | |
| volumes: | |
| - ./src:/var/www/ | |
| web: | |
| image: php:5.6-apache | |
| links: | |
| - db | |
| ports: | |
| - "8888:80" | |
| volumes: | |
| - ./conf/php.ini:/usr/local/etc/php/conf.d/custom.ini | |
| volumes_from: | |
| - data | |
| db: | |
| image: mariadb:5.5 | |
| volumes: | |
| - ./data/dump:/docker-entrypoint-initdb.d | |
| - ./data/db:/var/lib/mysql | |
| environment: | |
| MYSQL_ROOT_PASSWORD: root | |
| MYSQL_DATABASE: mysqldb | |
| MYSQL_USER: mysqldb_user | |
| MYSQL_PASSWORD: mysqldb_password |
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
| . | |
| ├── conf | |
| │ ├── php.ini | |
| ├── data | |
| │ ├── dump | |
| │ │ ├── dump.sql | |
| │ ├── db | |
| │ │ ├── ... | |
| ├── docker-compose.yml | |
| ├── src | |
| │ ├── html | |
| │ │ ├── index.php |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment