Skip to content

Instantly share code, notes, and snippets.

@astrsk-hori
Created January 20, 2016 10:51
Show Gist options
  • Save astrsk-hori/72527063363e34819ec1 to your computer and use it in GitHub Desktop.
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
# 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