Starting a development environment for postgres.
- Define the environment's parameters by using .env properties file:
ENV_NAME=<<environment-name>>
NGINX_RELEASE= 1.21
NGINX_HOSTPORT=8081
POSTGRES_RELEASE=17.2
POSTGRES_USER=<<postgres-user>>
POSTGRES_PASSWORD=<<postgres-password>>
PGADMIN_RELEASE=latest
PGADMIN_EMAIL=<<pgadmin-user>>
PGADMIN_PASSWORD=<<pgadmin-password>>
- Create into the folder config/certs the server certification files for nginx with following command:
openssl req -x509 -newkey rsa:4096 -sha256 -days 365 -nodes -keyout server.key -out ./config/certs/server.crt -subj '/CN=localhost'- Spin up the evironment with docker compose:
# Starting the development environment
docker compose --env-file path/to/your/.env up -d