docker-compose.yml 1.4 KB

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