Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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 src/.env.EXAMPLE
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ STREAM_LOGS=True

# Database — don't change unless you know what you're doing
POSTGRES_HOST=postgres
POSTGRES_PORT=5432
POSTGRES_PORT=5432 # used in container
Comment thread
Xarlos89 marked this conversation as resolved.
Outdated
POSTGRES_PORT_HOST=5432 # host system only
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}:${POSTGRES_PORT}"
Comment thread
Xarlos89 marked this conversation as resolved.
Outdated
networks:
- eos
restart: unless-stopped
Expand Down
Loading