Last active
May 22, 2020 10:42
-
-
Save louisbl/070ae6abd47f4c16258e0062339e2198 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