Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: docker databases #1346

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Fix: docker databases #1346

wants to merge 1 commit into from

Conversation

jmilljr24
Copy link
Collaborator

@jmilljr24 jmilljr24 commented Jan 25, 2025

🔗 Issue

Resolves #1334

✍️ Description

The queue and cable database's tables were not being created when initially running db:migrate. The default install of Solid Cable and Solid queue do not add a migration file. The tables are built from the schema files. Running db:migrate seems to looks for the migration files and when there is none, it overwrites the schema files and we end up with an database with no tables.

This change adds db:prepare to the entry point file which properly creates the tables and also seeds the db. I also removed asset precompile, maybe that will help with the assets issues in development?? #1317

I'd suggest nuking your database, then run docker compose build.

📷 Screenshots/Demos

@@ -50,6 +50,8 @@ services:
environment:
DATABASE_URL: postgres://${DATABASE_USERNAME:-postgres}:${DATABASE_PASSWORD:-password}@postgres:5432/petrescue_development
RAILS_ENV: development
SERVICE_NAME: app
SOLID_QUEUE_IN_PUMA: true
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When true, runs solid queue job service via puma.

@@ -4,5 +4,10 @@ set -e
# Remove a potentially pre-existing server.pid for Rails.
rm -f /petrescue/tmp/pids/server.pid

if [ "$SERVICE_NAME" = "app" ]; then
Copy link
Collaborator Author

@jmilljr24 jmilljr24 Jan 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We only want this to run on the app service not sass.

@jmilljr24 jmilljr24 requested a review from kasugaijin January 25, 2025 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Get solid queue working in Docker
1 participant