Skip to content

Instantly share code, notes, and snippets.

@baobao
Created August 21, 2019 13:12
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 baobao/515e3addc59cb84a64fb05705f2af168 to your computer and use it in GitHub Desktop.
Save baobao/515e3addc59cb84a64fb05705f2af168 to your computer and use it in GitHub Desktop.
version: '2'
services:
web:
build:
context: ./
dockerfile: deploy/web.docker
volumes:
- ./:/var/www
ports:
- "8080:80"
links:
- app
app:
build:
context: ./
dockerfile: deploy/app.docker
volumes:
- ./:/var/www
links:
- database
- cache
environment:
- "DB_PORT=3306"
- "DB_HOST=database"
- "REDIS_PORT=6379"
- "REDIS_HOST=cache"
database:
image: mysql:5.6
environment:
- "MYSQL_ROOT_PASSWORD=sample_pass"
- "MYSQL_DATABASE=sample_db"
ports:
- "33061:3306"
cache:
image: redis:3.0
ports:
- "63791:6379"
queue:
build:
context: ./
dockerfile: deploy/queue.docker
volumes:
- ./:/var/www
links:
- database
environment:
- "DB_PORT=3306"
- "DB_HOST=database"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment