Skip to content

Instantly share code, notes, and snippets.

@herloct
Forked from bangiqi/docker-compose1.yml
Last active April 9, 2017 15:43
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 herloct/cd18ae70f6757a16250b8c4711a5e7cf to your computer and use it in GitHub Desktop.
Save herloct/cd18ae70f6757a16250b8c4711a5e7cf 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
networks:
- simanset
app:
build:
context: ./
dockerfile: deploy/app.docker
volumes:
- ./:/var/www
links:
- cache
networks:
- simanset
environment:
- "DB_PORT=3306"
- "DB_HOST=simanset_mysql"
- "REDIS_PORT=6379"
- "REDIS_HOST=cache"
- "VIRTUAL_HOST=apisimanset.dev"
cache:
image: redis:3.0
networks:
- simanset
networks:
simanset:
external:
name: simanset
version: '2'
services:
web:
build:
context: ./
dockerfile: deploy/web.docker
volumes:
- ./:/var/www
ports:
- "8080:80"
links:
- app
networks:
- simanset
app:
build:
context: ./
dockerfile: deploy/app.docker
volumes:
- ./:/var/www
links:
- cache
networks:
- simanset
environment:
- "DB_PORT=3306"
- "DB_HOST=simanset_mysql"
- "REDIS_PORT=6379"
- "REDIS_HOST=cache"
- "VIRTUAL_HOST=simanset.dev"
cache:
image: redis:3.0
networks:
- simanset
networks:
simanset:
external:
name: simanset
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment