Link shorten service.
- Change the passwords:
src/main/resources/server.properties
docker-compose.yml
- (Optional) Change the look and feel:
src/main/resources/html/style.css
- Create the data directory:
$ mkdir data
- Build the application:
$ docker-compose build
- Start the application:
$ docker-compose up
The application will run on port 8082
, you can change this in the docker-compose.yml
file.
If you need/want an example configuration for NGINX look no further.
- SSH to your server, cd into the repo directory
- Since the passwords were changed (and committed), pull with rebase:
$ git pull --rebase
- Stop and remove the containers:
$ docker-compose stop
$ docker-compose rm -f
- Change the owner of the data owner back to the user building the container:
$ chown -R user:user data
- This can be skipped if you use
root
to build/start the container
- Build the updated container and start it:
$ docker-compose build
$ docker-compose up -d
- Check if the application runs correctly
- Don't change the db password (without updating the command below)!
- Build the project using any (Java) IDE
- Run the database:
$ docker run -it -v "$(pwd)/db:/docker-entrypoint-initdb.d" -p 5432:5432 -e POSTGRES_PASSWORD=changemebabychangeme postgres:alpine
- Start the application from the IDE
The application will run on port 8080
by default, this can be changed in src/main/resources/server.properties
. Note that changing this will require you to update the docker-compose.yml
.