Extra config [port] for dev environment

This commit is contained in:
ductnn 2021-04-01 01:36:33 +07:00
parent cb5ffa0354
commit d683e37d77
3 changed files with 10 additions and 0 deletions

3
.env.example Normal file
View File

@ -0,0 +1,3 @@
# extra config for dev environment
POSTGRES_PORT=5432
REDIS_PORT=6379

1
.gitignore vendored
View File

@ -10,3 +10,4 @@ configuration/ldap/*
!configuration/ldap/ldap_config.py !configuration/ldap/ldap_config.py
prometheus.yml prometheus.yml
super-linter.log super-linter.log
.env

View File

@ -35,6 +35,9 @@ services:
env_file: env/postgres.env env_file: env/postgres.env
volumes: volumes:
- netbox-postgres-data:/var/lib/postgresql/data - netbox-postgres-data:/var/lib/postgresql/data
ports:
- "${POSTGRES_PORT-5432}:5432"
restart: always
# redis # redis
redis: redis:
@ -46,6 +49,9 @@ services:
env_file: env/redis.env env_file: env/redis.env
volumes: volumes:
- netbox-redis-data:/data - netbox-redis-data:/data
ports:
- "${REDIS_PORT-6379}:6379"
restart: always
redis-cache: redis-cache:
image: redis:6-alpine image: redis:6-alpine
command: command: