Change default PostgreSQL port

This commit is contained in:
silverpill 2022-03-05 12:48:30 +00:00
parent ee7ae3cd4f
commit bdce305b24
4 changed files with 4 additions and 4 deletions

View file

@ -37,7 +37,7 @@ docker-compose up
Test connection:
```
psql -h localhost -p 5432 -U mitra mitra
psql -h localhost -p 55432 -U mitra mitra
```
### Run web service

View file

@ -1,4 +1,4 @@
database_url: postgres://mitra:mitra@127.0.0.1:5432/mitra
database_url: postgres://mitra:mitra@127.0.0.1:55432/mitra
storage_dir: files
http_host: '127.0.0.1'

View file

@ -9,7 +9,7 @@ services:
POSTGRES_USER: mitra
POSTGRES_DB: mitra
ports:
- "5432:5432"
- "55432:5432"
volumes:
- mitra_postgres:/var/lib/postgresql/data

View file

@ -3,7 +3,7 @@ use tokio_postgres::config::Config;
use super::create_database_client;
use super::migrate::apply_migrations;
const DEFAULT_CONNECTION_URL: &str = "postgres://mitra:mitra@127.0.0.1:5432/mitra-test";
const DEFAULT_CONNECTION_URL: &str = "postgres://mitra:mitra@127.0.0.1:55432/mitra-test";
pub async fn create_test_database() -> Client {
let connection_url = std::env::var("TEST_DATABASE_URL")