Restructured docker-compose.yml
This commit is contained in:
parent
1e96f5a191
commit
ecb5ecd1a4
@ -1,53 +1,32 @@
|
||||
version: '2'
|
||||
|
||||
version: '3'
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:9.6
|
||||
container_name: postgres
|
||||
environment:
|
||||
POSTGRES_USER: netbox
|
||||
POSTGRES_PASSWORD: J5brHrAXFLQSif0K
|
||||
POSTGRES_DB: netbox
|
||||
netbox:
|
||||
build: .
|
||||
image: digitalocean/netbox
|
||||
links:
|
||||
- postgres
|
||||
container_name: netbox
|
||||
image: digitalocean/netbox:v2.0-beta2
|
||||
depends_on:
|
||||
- postgres
|
||||
environment:
|
||||
SUPERUSER_NAME: admin
|
||||
SUPERUSER_EMAIL: admin@example.com
|
||||
SUPERUSER_PASSWORD: admin
|
||||
ALLOWED_HOSTS: localhost
|
||||
DB_NAME: netbox
|
||||
DB_USER: netbox
|
||||
DB_PASSWORD: J5brHrAXFLQSif0K
|
||||
DB_HOST: postgres
|
||||
SECRET_KEY: r8OwDznj!!dci#P9ghmRfdu1Ysxm0AiPeDCQhKE+N_rClfWNj
|
||||
EMAIL_SERVER: localhost
|
||||
EMAIL_PORT: 25
|
||||
EMAIL_USERNAME: foo
|
||||
EMAIL_PASSWORD: bar
|
||||
EMAIL_TIMEOUT: 10
|
||||
EMAIL_FROM: netbox@bar.com
|
||||
NETBOX_USERNAME: guest
|
||||
NETBOX_PASSWORD: guest
|
||||
env_file: netbox.env
|
||||
volumes:
|
||||
- netbox-nginx-config:/etc/netbox-nginx/
|
||||
- netbox-static-files:/opt/netbox/netbox/static
|
||||
nginx:
|
||||
image: nginx:1.11.1-alpine
|
||||
links:
|
||||
- netbox
|
||||
container_name: nginx
|
||||
image: nginx:1.11-alpine
|
||||
command: nginx -g 'daemon off;' -c /etc/netbox-nginx/nginx.conf
|
||||
depends_on:
|
||||
- netbox
|
||||
ports:
|
||||
- 80:80
|
||||
volumes_from:
|
||||
- netbox
|
||||
- 80
|
||||
volumes:
|
||||
- netbox-static-files:/opt/netbox/netbox/static
|
||||
- netbox-nginx-config:/etc/netbox-nginx/
|
||||
postgres:
|
||||
image: postgres:9.6-alpine
|
||||
environment:
|
||||
POSTGRES_USER: netbox
|
||||
POSTGRES_PASSWORD: J5brHrAXFLQSif0K
|
||||
POSTGRES_DB: netbox
|
||||
volumes:
|
||||
netbox-static-files:
|
||||
driver: local
|
||||
netbox-nginx-config:
|
||||
driver: local
|
||||
|
17
netbox.env
Normal file
17
netbox.env
Normal file
@ -0,0 +1,17 @@
|
||||
SUPERUSER_NAME=admin
|
||||
SUPERUSER_EMAIL=admin@example.com
|
||||
SUPERUSER_PASSWORD=admin
|
||||
ALLOWED_HOSTS=localhost
|
||||
DB_NAME=netbox
|
||||
DB_USER=netbox
|
||||
DB_PASSWORD=J5brHrAXFLQSif0K
|
||||
DB_HOST=postgres
|
||||
SECRET_KEY=r8OwDznj!!dci#P9ghmRfdu1Ysxm0AiPeDCQhKE+N_rClfWNj
|
||||
EMAIL_SERVER=localhost
|
||||
EMAIL_PORT=25
|
||||
EMAIL_USERNAME=foo
|
||||
EMAIL_PASSWORD=bar
|
||||
EMAIL_TIMEOUT=10
|
||||
EMAIL_FROM=netbox@bar.com
|
||||
NETBOX_USERNAME=guest
|
||||
NETBOX_PASSWORD=guest
|
Loading…
Reference in New Issue
Block a user