-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
[BUG] External databases support with PostgreSQL #133
Comments
Hi. Could you also try to exec command |
docker compose exec -it buggregator php app.php migrate --force
But errors still occurs. |
1. Updates codebase up to PHP 8.2 using rector 2. Fixes database migrations #133 3. Runs migrations on server startup, when persistence driver `database` is used #133 4. Moves Dockerfile from `docker` -> `.docker` 5. Moves installation some PHP ext from repository `Dockerfile` to `buggregator/docker` repository to reduce time for docker image build 6. Improves `docker-compose.yaml`. Adds `mongodb`, `postgres` containers for testing connection 7. Adds missed `mongodb/mongodb` package #132
Hello @gander, I hope this message finds you well. I wanted to let you know that I've recently released a new version which should address the issue we discussed. When you have a moment, could you please check if everything is working as expected? Thank you so much for your time. |
Fresh:
Migration: docker compose exec -it buggregator php app.php migrate --force
# Migration 0_default_create_events was successfully executed. After:
|
This migration should be done during initialization. So far, I haven't seen any instructions about this migration anywhere. |
There is no need to run migrations. When RR is started, it runs the Do you use 1.7.3 version? |
yes. I do services:
buggregator:
image: ghcr.io/buggregator/server:latest
ports:
- 127.0.0.1:8000:8000
environment:
PERSISTENCE_DRIVER: database
DB_DRIVER: pgsql
DB_DATABASE: buggregator
DB_HOST: buggregator-db-pg
DB_PORT: 5432
DB_USERNAME: buggregator
DB_PASSWORD: buggregator
buggregator-db-pg:
image: postgres:latest
ports:
- 5432:5432
environment:
POSTGRES_DB: buggregator
POSTGRES_USER: buggregator
POSTGRES_PASSWORD: buggregator |
I think there can be a problem thaat buggregator starts before database service and migrations fails. You can check console on buggregator startup and see errors |
The full solution, is using services:
buggregator:
image: ghcr.io/buggregator/server:latest
depends_on:
buggregator-database:
condition: service_healthy
ports:
- 127.0.0.1:8000:8000
environment:
PERSISTENCE_DRIVER: database
DB_DRIVER: pgsql
DB_DATABASE: buggregator
DB_HOST: buggregator-database
DB_PORT: 5432
DB_USERNAME: buggregator
DB_PASSWORD: buggregator
buggregator-database:
image: postgres:latest
healthcheck:
test: [ "CMD-SHELL", "pg_isready --username=buggregator --dbname=buggregator" ]
interval: 1s
timeout: 1s
retries: 15
environment:
POSTGRES_DB: buggregator
POSTGRES_USER: buggregator
POSTGRES_PASSWORD: buggregator
|
Thanks for help! |
This works: services:
buggregator:
image: ghcr.io/buggregator/server:latest
depends_on:
buggregator-database:
condition: service_healthy
ports:
- 127.0.0.1:8000:8000
environment:
PERSISTENCE_DRIVER: database
DB_DRIVER: pgsql
DB_DATABASE: buggregator
DB_HOST: buggregator-database
DB_PORT: 5432
DB_USERNAME: buggregator
DB_PASSWORD: buggregator
buggregator-database:
image: postgres:latest
healthcheck:
test: [ "CMD-SHELL", "pg_isready --username=buggregator --dbname=buggregator" ]
interval: 3s
timeout: 3s
retries: 1
environment:
POSTGRES_DB: buggregator
POSTGRES_USER: buggregator
POSTGRES_PASSWORD: buggregator |
Thank you! |
The text was updated successfully, but these errors were encountered: