mirror of
https://github.com/OHTU-German-learning-website/OHTU-German-learning-website.git
synced 2026-10-12 19:13:51 +03:00
axel/update port (#33)
* updated port * updated port * fix script ports
This commit is contained in:
@@ -23,7 +23,7 @@ This should be all that's needed:
|
||||
- Run PostgreSQL:
|
||||
- Init .env files `./init-env.sh` — This will create the required .env files for environment variables. The local db credentials are
|
||||
- DB_HOST=localhost
|
||||
- DB_PORT=6543
|
||||
- DB_PORT=7742
|
||||
- DB_USER=ohtu
|
||||
- DB_PASSWORD=password
|
||||
- DB_NAME=gradesa
|
||||
|
||||
+2
-2
@@ -5,11 +5,11 @@ set -euo pipefail
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
echo "Migrating"
|
||||
pgmigrate migrate -d postgres://ohtu:password@localhost:6543/gradesa -m migrations
|
||||
pgmigrate migrate -d postgres://ohtu:password@localhost:7742/gradesa -m migrations
|
||||
echo "Migrating done"
|
||||
|
||||
# We generate the schema file to make sure that the schema is up to date
|
||||
# The github workflow will check for uncommitted changes and fail if there is
|
||||
# a difference between the schema file and the actual schema in the database
|
||||
pgmigrate dump -d postgres://ohtu:password@localhost:6543/gradesa --out schema.sql
|
||||
pgmigrate dump -d postgres://ohtu:password@localhost:7742/gradesa --out schema.sql
|
||||
echo "Dumping done"
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ set -euo pipefail
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
psql "postgres://ohtu:password@localhost:6543/gradesa" -c "DROP SCHEMA public CASCADE;CREATE SCHEMA public;"
|
||||
psql "postgres://ohtu:password@localhost:7742/gradesa" -c "DROP SCHEMA public CASCADE;CREATE SCHEMA public;"
|
||||
cd ../
|
||||
pnpm run db:migrate
|
||||
echo "Migration DONE"
|
||||
+2
-2
@@ -10,7 +10,7 @@ services:
|
||||
- ./provision_db.sql:/docker-entrypoint-initdb.d/1_provision_db.sql
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "6543:5432"
|
||||
- "7742:5432"
|
||||
healthcheck:
|
||||
test: ["CMD", "pg_isready", "-U", "postgres"]
|
||||
interval: 10s
|
||||
@@ -31,7 +31,7 @@ services:
|
||||
echo 'trusted = true' >> /usr/share/postgresql/15/extension/rum.control &&
|
||||
/usr/local/bin/docker-entrypoint.sh -c fsync=off -c log_statement=all"
|
||||
ports:
|
||||
- "6542:5432"
|
||||
- "7741:5432"
|
||||
healthcheck:
|
||||
test: ["CMD", "pg_isready", "-U", "postgres"]
|
||||
interval: 10s
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
DB_HOST=localhost
|
||||
DB_PORT=6542
|
||||
DB_PORT=7741
|
||||
DB_USER=postgres
|
||||
DB_PASSWORD=password
|
||||
DB_NAME=postgres
|
||||
|
||||
Reference in New Issue
Block a user