/overworld-backend

Backend for the Overworld

Primary LanguageJavaOtherNOASSERTION

overworld-backend

Development

Getting started

Make sure you have the following installed:

Alternatively you can use Docker

First you have to change the spring.datasource.username and the spring.datasource.password in the application.properties file. If you changed the properties of the postgres db, you also have to change spring.datasource.url.

Run

mvn install

in the folder of the project. Go to the target folder and run

java -jar crossword-service-0.0.1-SNAPSHOT.jar

Run with Docker-compose

Start all dependencies with our docker-compose files. Check the manual for docker-compose.

Single Container

Build the Docker container with

docker build  -t overworld-backend-dev .

And run it at port 8000 with

docker run -d -p 8000:80 -e POSTGRES_URL="postgresql://host.docker.internal:5432/postgres" -e POSTGRES_USER="postgres" -e POSTGRES_PASSWORD="postgres" --name overworld-backend-dev overworld-backend-dev

To monitor, stop and remove the container you can use the following commands:

docker ps -a -f name=overworld-backend-dev
docker stop overworld-backend-dev
docker rm overworld-backend-dev

To run the prebuild container use

docker run -d -p 8000:80 -e POSTGRES_URL="postgresql://host.docker.internal:5432/postgres" -e POSTGRES_USER="postgres" -e POSTGRES_PASSWORD="postgres" --name overworld-backend ghcr.io/gamify-it/overworld-backend:latest

testing database

to setup a database with docker for testing you can use

docker run -d -p 5432:5432 -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres -e POSTGRES_DB=postgres  --rm --name overworld-database postgres

To stop and remove it simply type

docker stop overworld-database