--- version: "3" volumes: netbox-static-files: driver: local netbox-nginx-config: driver: local netbox-media-files: driver: local netbox-redis-data: driver: local services: netbox: &netbox image: netboxcommunity/netbox:v2.9.9 container_name: netbox_instance hostname: netbox_instance depends_on: - redis - redis-cache - netbox-worker env_file: env/netbox.env user: '101' volumes: - ./etc/netbox/etc/netbox/config:/etc/netbox/config:z,ro - ./etc/netbox/etc/netbox/reports:/etc/netbox/reports:z,ro - ./etc/netbox/etc/netbox/scripts:/etc/netbox/scripts:z,ro - ./etc/netbox/opt/netbox/initializers:/opt/netbox/initializers:z,ro - ./etc/netbox/opt/netbox/startup_scripts:/opt/netbox/startup_scripts:z,ro - netbox-nginx-config:/etc/netbox-nginx:z - netbox-static-files:/opt/netbox/netbox/static:z - netbox-media-files:/opt/netbox/netbox/media:z netbox-worker: <<: *netbox container_name: netbox_worker hostname: netbox_worker depends_on: - redis entrypoint: - python3 - /opt/netbox/netbox/manage.py command: - rqworker nginx: image: nginx:1.19-alpine container_name: netbox_nginx hostname: netbox_nginx depends_on: - netbox ports: - "3009:8080" volumes: - netbox-nginx-config:/etc/netbox-nginx/:ro - netbox-static-files:/opt/netbox/netbox/static:ro command: nginx -c /etc/netbox-nginx/nginx.conf redis: image: redis:6.0.9-alpine container_name: netbox_redis hostname: netbox_redis env_file: env/redis.env volumes: - netbox-redis-data:/data command: - sh - -c # this is to evaluate the $REDIS_PASSWORD from the env - redis-server --appendonly yes --requirepass $$REDIS_PASSWORD ## $$ because of docker-compose redis-cache: image: redis:6.0.9-alpine container_name: netbox_redis_cache hostname: netbox_redis_cache env_file: env/redis-cache.env command: - sh - -c # this is to evaluate the $REDIS_PASSWORD from the env - redis-server --requirepass $$REDIS_PASSWORD ## $$ because of docker-compose ...