diff --git a/.env.sample b/.env.example similarity index 93% rename from .env.sample rename to .env.example index cce5299..fc61d8a 100644 --- a/.env.sample +++ b/.env.example @@ -1,7 +1,7 @@ -DB_HOST=localhost +DB_HOST=postgresql DB_USERNAME=sfscon -DB_PASSWORD=__PLACE_YOUR_PASSWORD__ +DB_PASSWORD=sfscon DB_NAME=sfscon DB_PORT=5432 diff --git a/README.md b/README.md index 430ae6b..44f5d4f 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ app - checkout this repository - run docker compose build -- setup .env file (from .env.sample) +- setup .env file (from .env.example) - setup global nginx (see configuration file in config/nginx.global.conf.sample - run docker compose up -d @@ -25,10 +25,10 @@ visible from docker containers on host.docker.internal this is defined at the top of .env file as ``` -DB_HOST=host.docker.internal -DB_USERNAME=opencon_user # or any other your username -DB_PASSWORD=__your_password__ -DB_NAME=opencon_db # or any other database name +DB_HOST=postgres +DB_USERNAME=sfscon # or any other your username +DB_PASSWORD=sfscon +DB_NAME=sfscon # or any other database name DB_PORT=5432 ``` diff --git a/docker-compose.yaml b/docker-compose.yaml index dd4c4d7..26885d8 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -55,3 +55,15 @@ services: volumes: - ./src/:/app - /var/log/opencon:/var/log/opencon + + postgres: + image: "postgres:14-alpine" + environment: + POSTGRES_DB: sfscon + POSTGRES_USER: sfscon + POSTGRES_PASSWORD: sfscon + hostname: postgres + volumes: + - /tmp/epaper_pgdata:/var/lib/postgresql/data + ports: + - "${POSTGRES_PORT}:5432"