please download files on your computer.
# example use postgresql
$ cd your_project_path
$ mv docker-compose-postgresql.yml docker-compose.yml
$ docker-compose up -d
# terminate
$ docker-compose down| version: '2' | |
| services: | |
| datastore: | |
| image: busybox | |
| volumes: | |
| - mysql_data:/var/lib/mysql | |
| db: | |
| image: "mysql:5.7.17" | |
| command: ['--character-set-server=utf8mb4', '--collation-server=utf8mb4_general_ci'] | |
| environment: | |
| - "MYSQL_ROOT_PASSWORD=password" | |
| volumes_from: | |
| - datastore | |
| ports: | |
| - "3306:3306" | |
| volumes: | |
| mysql_data: | |
| driver: local |
| version: '2' | |
| services: | |
| datastore: | |
| image: busybox | |
| volumes: | |
| - postgres_data:/var/lib/postgresql/data | |
| db: | |
| image: "postgres:9.6.3-alpine" | |
| environment: | |
| - "POSTGRES_USER=postgres" | |
| - "POSTGRES_PASSWORD=password" | |
| volumes_from: | |
| - datastore | |
| ports: | |
| - "5432:5432" | |
| volumes: | |
| postgres_data: |