Skip to content

Instantly share code, notes, and snippets.

@gcphost
Created September 12, 2016 16:02
Show Gist options
  • Save gcphost/789debcd7c8f950c46bbcce675061522 to your computer and use it in GitHub Desktop.
Save gcphost/789debcd7c8f950c46bbcce675061522 to your computer and use it in GitHub Desktop.
Docker, Rancher, and Laravel: Easy and Safe Scalability! docker-compose.yaml
postgres:
image: 'postgres:latest'
environment:
- POSTGRES_USER=blog
- POSTGRES_PASSWORD=blog123
redis:
restart: always
labels:
io.rancher.scheduler.affinity:host_label: rediscluster=true
io.rancher.scheduler.affinity:container_label_soft_ne: pptqueuenew=true
io.rancher.container.pull_image: always
tty: true
image: redis:3
stdin_open: true
web:
image: 'lucacri/laravelcaddy'
restart: always
links:
- postgres:postgres
- redis:redis
- beanstalk:queue
environment:
- APP_DEBUG=true
- DB_HOST=postgres
- QUEUE_DRIVER=redis
- DB_DATABASE=blog
- DB_USERNAME=blog
- DB_PASSWORD=blog123
- USERMOD="1000 www-data"
ports:
- '80:80'
volumes:
- ./:/var/www
beanstalk:
image: 'schickling/beanstalkd:latest'
restart: always
labels:
io.rancher.scheduler.affinity:host_label: beanstalk=true
io.rancher.scheduler.affinity:container_label_soft_ne: pptqueuenew=true
tty: true
stdin_open: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment