Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ What it does:

## Configuration

If you already have postgres installed on your system then you may have conflicting ports, in that case change the `POSTGRES_PORT` to a free port in the `.env`, usually `5433`. Then rebuild by using following command:
If you already have postgres installed on your system then you may have conflicting ports, in that case change
the `POSTGRES_PORT_HOST` to a free port in the `.env`, usually `5433`. (Clarification:`POSTGRES_PORT` env variable is only used within the container environment). Then rebuild by using following command:
```
docker compose up -d --build
```
Expand Down
1 change: 1 addition & 0 deletions src/.env.EXAMPLE
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ STREAM_LOGS=True
# Database — don't change unless you know what you're doing
POSTGRES_HOST=postgres
POSTGRES_PORT=5432
POSTGRES_PORT_HOST=5432
PGUSER=postgres
# POSTGRES_USER must match PGUSER — the postgres image uses this to create the superuser
POSTGRES_USER=postgres
Expand Down
7 changes: 0 additions & 7 deletions src/db/init.sql
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
DO $$
BEGIN
IF NOT EXISTS (SELECT FROM pg_database WHERE datname = 'eos') THEN
CREATE DATABASE eos;
END IF;
END $$;

-- Create serversettings table
CREATE TABLE IF NOT EXISTS serversettings (
id SERIAL PRIMARY KEY,
Expand Down
2 changes: 1 addition & 1 deletion src/db/migration-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

until pg_isready -h "$POSTGRES_HOST" -U "$POSTGRES_USER" -d "$POSTGRES_DATABASE"; do
until pg_isready -h "$POSTGRES_HOST" -U "$POSTGRES_USER" -d "$POSTGRES_DB"; do
sleep 1
done

Expand Down
2 changes: 1 addition & 1 deletion src/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ services:
retries: 5
start_period: 20s
ports:
- "127.0.0.1:${POSTGRES_PORT}:5432"
- "127.0.0.1:${POSTGRES_PORT_HOST:-5432}:${POSTGRES_PORT}"
networks:
- eos
restart: unless-stopped
Expand Down
Loading