Created
January 20, 2016 10:51
-
-
Save astrsk-hori/72527063363e34819ec1 to your computer and use it in GitHub Desktop.
docker-composeでmysql & postgreSQL をサクッと起動 ref: http://qiita.com/astrsk_hori/items/1e683a7a2f2b7189cb6e
This file contains 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
# mysql --------------------------------------------- | |
datastore: | |
image: busybox | |
volumes: | |
- /opt/datastore:/var/lib/mysql | |
container_name: mysql-datastore | |
mysql: | |
image: mysql | |
environment: | |
MYSQL_ROOT_PASSWORD: password | |
ports: | |
- "3306:3306" | |
volumes_from: | |
- datastore | |
container_name: mysql-db | |
# --------------------------------------------------- | |
# postgres ------------------------------------------ | |
postgres-data: | |
image: busybox | |
volumes: | |
- /var/lib/postgresql/data | |
container_name: postgres-datastore | |
postgresql: | |
image: postgres | |
environment: | |
POSTGRES_USER: hoge | |
POSTGRES_PASSWORD: password | |
ports: | |
- "5432:5432" | |
container_name: postgres-db | |
volumes_from: | |
- postgres-data | |
# --------------------------------------------------- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment