Skip to content

Instantly share code, notes, and snippets.

@akapitula
Last active October 5, 2016 15:39
Show Gist options
  • Save akapitula/e240336507c36b2b14fd5eda5a8257cf to your computer and use it in GitHub Desktop.
Save akapitula/e240336507c36b2b14fd5eda5a8257cf to your computer and use it in GitHub Desktop.
docker configuration network
echo "#
# This docker-compose file can deploy a whole Linkcare application.
# You should create a local.php and configure it for ws
# The frontend is automatically configured with the attached ws endpoint
client:
image: linkcare${APP_NAME}_client
ports:
- "${VIRTUAL_PORT_FRONTEND}:3000"
volumes:
- /var/www/${APP_NAME}/frontend:/var/www/html/docs
links:
- ws
- redis
environment:
VIRTUAL_HOST: '${VIRTUAL_HOST_FRONTEND}'
REDIS: 'redis'
WS_ENDPOINT: 'http://ws/ServerWSDL.php'
TOKEN: '98a9e8a38ac030f48acf0231d659c58c96640d3e6fb76e688cfeed81224a62ff3f57dac3f684eef56f2122b587828f7f8521f79594d80ceb40fad72ab4d28074'
RAILS_ENV: 'production'
restart: unless-stopped
ws:
image: linkcare${APP_NAME}_ws
ports:
- "${VIRTUAL_PORT_API}:80"
volumes:
- /var/www/${APP_NAME}/docs:/var/www/html/docs
- /var/www/${APP_NAME}/export:/var/www/html/export
- /var/www/${APP_NAME}/ws/background:/var/www/html/background
- /var/www/${APP_NAME}/ws/conf:/var/www/html/conf
- /var/www/${APP_NAME}/ws/lib:/var/www/html/lib
- /var/www/${APP_NAME}/ws/classes:/var/www/html/classes
- /var/www/${APP_NAME}/ws/models:/var/www/html/models
- /var/www/${APP_NAME}/ws/migrate:/var/www/html/migrate
- /var/www/${APP_NAME}/ws/client:/var/www/html/client
- /var/www/${APP_NAME}/ws/tmp:/var/www/html/tmp
- /var/www/${APP_NAME}/ws/osaki:/var/www/html/osaki
- /var/www/${APP_NAME}/ws/testing:/var/www/html/testing
- /var/www/${APP_NAME}/ws/configuracion.php:/var/www/html/configuracion.php
- /var/www/${APP_NAME}/ws/LINKCARE.wsdl.php:/var/www/html/LINKCARE.wsdl.php
- /var/www/${APP_NAME}/ws/ServerWSDL.php:/var/www/html/ServerWSDL.php
- /var/www/${APP_NAME}/ws/render.php:/var/www/html/render.php
links:
- redis
environment:
VIRTUAL_HOST: '${VIRTUAL_HOST_API}'
restart: unless-stopped
worker:
image: linkcare${APP_NAME}_ws
volumes_from:
- ws
links:
- redis
environment:
APP_INCLUDE: 'background/init.php'
PREFIX: '${APP_NAME}'
QUEUE: '${APP_NAME}'
COUNT: 1
INTERVAL: 2
VVERBOSE: 1
command: php vendor/chrisboulton/php-resque/resque.php
restart: unless-stopped
redis:
image: redis
restart: unless-stopped
" > docker-compose.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment