debug: CI: switch name back to database and print URI

This commit is contained in:
Aravinth Manivannan 2022-12-19 10:57:30 +05:30
parent 0a05fb945f
commit fdf31ecfd2
Signed by: realaravinth
GPG Key ID: AD9F0F08E855ED88
2 changed files with 3 additions and 2 deletions

View File

@ -2,7 +2,7 @@ pipeline:
backend:
image: rust
environment:
- DATABASE_URL=postgres://postgres:password@librepages_librepages_postgres_database/postgres
- DATABASE_URL=postgres://postgres:password@database:5432/postgres
commands:
- curl -fsSL https://deb.nodesource.com/setup_16.x | bash - &&\
- apt update && apt-get -y --no-install-recommends install nodejs
@ -47,7 +47,7 @@ pipeline:
secrets: [RELEASE_BOT_GPG_SIGNING_KEY, DUMBSERVE_PASSWORD, GPG_PASSWORD]
services:
librepages_librepages_postgres_database:
database:
image: postgres
environment:
- POSTGRES_PASSWORD=password

View File

@ -48,6 +48,7 @@ impl ConnectionOptions {
async fn connect(self) -> ServiceResult<Database> {
let pool = match self {
Self::Fresh(fresh) => {
println!("{}", fresh.url);
let mut connect_options =
sqlx::postgres::PgConnectOptions::from_str(&fresh.url).unwrap();
if fresh.disable_logging {