Skip to content

Instantly share code, notes, and snippets.

@bangiqi
Created April 9, 2017 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save bangiqi/8515042fd50b0e544b156384ed9fad4d to your computer and use it in GitHub Desktop.
Save bangiqi/8515042fd50b0e544b156384ed9fad4d to your computer and use it in GitHub Desktop.
version: '2'
services:
web:
build:
context: ./
dockerfile: deploy/web.docker
volumes:
- ./:/var/www
ports:
- "8081: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"
- "VIRTUAL_HOST=apisimanset.dev"
database:
image: mysql:latest
environment:
- "MYSQL_ROOT_PASSWORD=secret"
- "MYSQL_DATABASE=db_simanset"
ports:
- "33062:3306"
cache:
image: redis:3.0
ports:
- "63792:6379"
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"
- "VIRTUAL_HOST=simanset.dev"
database:
image: mysql:latest
environment:
- "MYSQL_ROOT_PASSWORD=secret"
- "MYSQL_DATABASE=db_simanset"
ports:
- "33061:3306"
cache:
image: redis:3.0
ports:
- "63791:6379"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment