docker-compose.yml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. version: '2'
  2. services:
  3. postgres:
  4. image: postgres:9.6
  5. container_name: postgres
  6. environment:
  7. POSTGRES_USER: netbox
  8. POSTGRES_PASSWORD: J5brHrAXFLQSif0K
  9. POSTGRES_DB: netbox
  10. netbox:
  11. build: .
  12. image: digitalocean/netbox
  13. links:
  14. - postgres
  15. container_name: netbox
  16. depends_on:
  17. - postgres
  18. environment:
  19. SUPERUSER_NAME: admin
  20. SUPERUSER_EMAIL: admin@example.com
  21. SUPERUSER_PASSWORD: admin
  22. ALLOWED_HOSTS: localhost
  23. DB_NAME: netbox
  24. DB_USER: netbox
  25. DB_PASSWORD: J5brHrAXFLQSif0K
  26. DB_HOST: postgres
  27. SECRET_KEY: r8OwDznj!!dci#P9ghmRfdu1Ysxm0AiPeDCQhKE+N_rClfWNj
  28. EMAIL_SERVER: localhost
  29. EMAIL_PORT: 25
  30. EMAIL_USERNAME: foo
  31. EMAIL_PASSWORD: bar
  32. EMAIL_TIMEOUT: 10
  33. EMAIL_FROM: netbox@bar.com
  34. NETBOX_USERNAME: guest
  35. NETBOX_PASSWORD: guest
  36. volumes:
  37. - netbox-static-files:/opt/netbox/netbox/static
  38. nginx:
  39. image: nginx:1.11.1-alpine
  40. links:
  41. - netbox
  42. container_name: nginx
  43. command: nginx -g 'daemon off;' -c /etc/netbox-nginx/nginx.conf
  44. depends_on:
  45. - netbox
  46. ports:
  47. - 80:80
  48. volumes_from:
  49. - netbox
  50. volumes:
  51. netbox-static-files:
  52. driver: local