Skip to content

Instantly share code, notes, and snippets.

@mpayetta
Created August 29, 2018 19:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mpayetta/1c6c0a92ebf3b622e17e481462219adf to your computer and use it in GitHub Desktop.
Save mpayetta/1c6c0a92ebf3b622e17e481462219adf to your computer and use it in GitHub Desktop.
Docker compose for wichita
version: '2.1'
services:
wichita-frontend:
build: wichita-api-dashboard-frontend # specify the directory of the Dockerfile
ports:
- "8080:80"
wichita-api:
build: wichita-api-dashboard # specify the directory of the Dockerfile
depends_on:
- db
environment:
PORT: 3000
AWS_ACCESS_KEY_ID: [PUT SECRET KEY ID HERE]
AWS_SECRET_ACCESS_KEY: [PUT SECRET ACCESS KEY HERE]
DB_HOST: db
DB_USER: root
DB_PASS: root
DB_PORT: 3306
ports:
- "3000:3000"
command: ["./wait-for-mysql.sh", "db"] # this will make the api server wait until mysql is up to start the node process
db:
image: mysql
command: --default-authentication-plugin=mysql_native_password
restart: always
ports:
- "3307:3306"
environment:
MYSQL_ROOT_PASSWORD: root # if you change this, make sure you cange it on line 19 as well
MYSQL_DATABASE: wichita_dev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment