diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..c1a4277 --- /dev/null +++ b/.env.example @@ -0,0 +1,3 @@ +# extra config for dev environment +POSTGRES_PORT=5432 +REDIS_PORT=6379 diff --git a/.gitignore b/.gitignore index 07859bb..18a92a6 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ configuration/ldap/* !configuration/ldap/ldap_config.py prometheus.yml super-linter.log +.env diff --git a/docker-compose.yml b/docker-compose.yml index 4b0fda3..b2b5f1f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -35,6 +35,9 @@ services: env_file: env/postgres.env volumes: - netbox-postgres-data:/var/lib/postgresql/data + ports: + - "${POSTGRES_PORT-5432}:5432" + restart: always # redis redis: @@ -46,6 +49,9 @@ services: env_file: env/redis.env volumes: - netbox-redis-data:/data + ports: + - "${REDIS_PORT-6379}:6379" + restart: always redis-cache: image: redis:6-alpine command: