Advertisement
ovizii

docker-compose.yml

Apr 20th, 2017
1,383
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. version: "2"
  2.  
  3. services:
  4. db:
  5. image: mysql
  6. environment:
  7. MYSQL_DATABASE: ninja
  8. MYSQL_ROOT_PASSWORD: ***
  9. volumes:
  10. - ./db:/var/lib/mysql
  11.  
  12.  
  13. app:
  14. image: invoiceninja/invoiceninja
  15. links:
  16. - db:mysql
  17. env_file: .env
  18.  
  19. web:
  20. image: nginx
  21. volumes:
  22. - ./nginx.conf:/etc/nginx/nginx.conf:ro
  23. - ./app:/var/www/app
  24. links:
  25. - app
  26. volumes_from:
  27. - app
  28. ports:
  29. - 8000:80
  30. environment:
  31. VIRTUAL_HOST: invoicing.mydomain.tld
  32. LETSENCRYPT_HOST: invoicing.mydomain.tld
  33. LETSENCRYPT_EMAIL: me@mydomain.tld
  34. TRUSTED_PROXIES: '51.xxx.xxx.xxx/28,172.17.0.0/24'
  35.  
  36. cron:
  37. image: invoiceninja/invoiceninja
  38. links:
  39. - db:mysql
  40. env_file: .env
  41. volumes_from:
  42. - app
  43. entrypoint: |
  44. bash -c 'bash -s <<EOF
  45. trap "break;exit" SIGHUP SIGINT SIGTERM
  46. sleep 300s
  47. while /bin/true; do
  48. /usr/local/bin/php /var/www/app/artisan ninja:send-invoices
  49. /usr/local/bin/php /var/www/app/artisan ninja:send-reminders
  50. sleep 1d
  51. done
  52. EOF'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement