myheats

Live heats, scoring and leaderboard for sport events
git clone https://git.in0rdr.ch/myheats.git
Log | Files | Refs | Pull requests | README | LICENSE

commit ae971f03d8f02a93148c8c70f2cd341efb6355f2
parent 633094a8449909936276e5acf127d95933a54b89
Author: Andreas Gruhler <andreas.gruhler@adfinis.com>
Date:   Sun, 15 Sep 2024 22:19:05 +0200

feat(magic): add dev dockerfiles

Adds a dev folder with instructions how to start the PostgreSQL database
and how to use the Adminer interface.

Diffstat:
Adev/README.md | 20++++++++++++++++++++
Adev/docker-compose.yml | 19+++++++++++++++++++
2 files changed, 39 insertions(+), 0 deletions(-)

diff --git a/dev/README.md b/dev/README.md @@ -0,0 +1,20 @@ +# Development setup + +This docker-compose environment configures a PostgreSQL database with Adminer +interface for development purposes: +* https://hub.docker.com/_/postgres + +The Adminer can be accessed at http://127.0.0.1:8080 with the default +username/password `postgres`/`example`. + +To initialize the database tables, source the sql files from `../schema`. + +This can be done in Adminer or with `psql`: +``` +# use `example` default password to apply +psql -h 127.0.0.1 -U postgres -p 5432 < ../schema/athletes.sql +psql -h 127.0.0.1 -U postgres -p 5432 < ../schema/heats.sql +psql -h 127.0.0.1 -U postgres -p 5432 < ../schema/judges.sql +psql -h 127.0.0.1 -U postgres -p 5432 < ../schema/scores.sql +psql -h 127.0.0.1 -U postgres -p 5432 < ../schema/startlist.sql +``` diff --git a/dev/docker-compose.yml b/dev/docker-compose.yml @@ -0,0 +1,19 @@ +# Use postgres/example user/password credentials +# https://hub.docker.com/_/postgres +version: '3.9' + +services: + db: + image: docker.io/postgres:16-alpine + shm_size: 128mb + environment: + POSTGRES_PASSWORD: example + ports: + - 5432:5432 + + adminer: + image: docker.io/adminer:latest + restart: always + ports: + - 8080:8080 +