Skip to content

Commit d1aa1bc

Browse files
committed
fixup: CI fix try: postgres didn't start for prod-boot
1 parent 446da83 commit d1aa1bc

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

.github/workflows/prod-boot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ jobs:
2020
ruby -e "require 'securerandom'; puts \"SECRET_KEY_BASE=#{SecureRandom.hex(64)}\"" >> deploy/.env
2121
echo "FORCE_SSL=false" >> deploy/.env
2222
echo "APP_HOST=localhost" >> deploy/.env
23+
# Copy Postgres config template and shrink memory settings
24+
cp deploy/postgres/postgresql.conf.example deploy/postgres/postgresql.conf
25+
sed -i 's/^shared_buffers = .*/shared_buffers = 128MB/' deploy/postgres/postgresql.conf
26+
sed -i 's/^effective_cache_size = .*/effective_cache_size = 256MB/' deploy/postgres/postgresql.conf
27+
sed -i 's/^work_mem = .*/work_mem = 4MB/' deploy/postgres/postgresql.conf
28+
sed -i 's/^maintenance_work_mem = .*/maintenance_work_mem = 64MB/' deploy/postgres/postgresql.conf
2329
2430
- name: Start database
2531
run: docker compose -f deploy/docker-compose.yml up -d db

config/database.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ test:
6565
production:
6666
primary: &primary_production
6767
<<: *default
68-
database: hackorum_production
68+
database: hackorum
6969
username: hackorum
7070
password: <%= ENV["HACKORUM_DATABASE_PASSWORD"] %>
7171
cache:

deploy/.env.example

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@ RAILS_SERVE_STATIC_FILES=1
66
SECRET_KEY_BASE=change-me
77

88
# Database (used by DATABASE_URL below)
9-
POSTGRES_USER=postgres
10-
POSTGRES_PASSWORD=postgres
9+
POSTGRES_USER=hackorum
10+
POSTGRES_PASSWORD=hackorum
1111
POSTGRES_DB=hackorum
12-
DATABASE_URL=postgresql://postgres:postgres@db:5432/hackorum
12+
# Keep it in sync with the above parameters!
13+
DATABASE_URL=postgresql://hackorum:hackorum@db:5432/hackorum
14+
HACKORUM_DATABASE_PASSWORD=hackorum
1315

1416
# IMAP ingestion
1517
IMAP_USERNAME=[email protected]

0 commit comments

Comments
 (0)