Skip to content
This repository has been archived by the owner on Dec 15, 2023. It is now read-only.

bothniabladet/bothniapp

Repository files navigation

Bothniapp

Image archive application written using Ktor and Freemarker.

Configuring

Example application.conf for local development (try not to commit local changes to this file). This file is located at src/main/resources/application.conf (relative to the project root directory).

# application.conf
ktor {
    ...
    database {
        jdbcURL = jdbc:postgresql://<hostname>:<port>/<database>
        user = postgres # (default)
        password = <password>
    }
}

... represents the remainder of the configuration, which is left as-is.

Building

Gradle (development)

# macOS & Linux
./gradlew build

# Windows
gradlew.bat build

Docker (production)

docker build -t bothniapp:latest .

Running

Gradle (development)

With configuration file (recommended for local development).

See instructions for configuring application further up.

# macOS & Linux
./gradlew run

# Windows
gradlew.bat run

With environment variables (recommended for production).

# macOS & Linux
DATABASE_JDBC_URL='<JDBC URL>' \
DATABASE_USER='<USER>' \
DATABASE_PASSWORD='<PASSWORD>' \
SECRET_ENCRYPT_KEY='<28-CHAR HEX-STRING>' \
SECRET_SIGN_KEY='<28-CHAR HEX-STRING>' \
./gradlew run

# Windows
DATABASE_JDBC_URL='<JDBC URL>' \
DATABASE_USER='<USER>' \
DATABASE_PASSWORD='<PASSWORD>' \
SECRET_ENCRYPT_KEY='<28-CHAR HEX-STRING>' \
SECRET_SIGN_KEY='<28-CHAR HEX-STRING>' \
gradlew.bat run

Docker (production)

docker run \
    -p 8080:8080 \
    -e DATABASE_JDBC_URL='<JDBC URL>' \
    -e DATABASE_USER='<USER>' \
    -e DATABASE_PASSWORD='<PASSWORD>' \
    -e SECRET_ENCRYPT_KEY='<28-CHAR HEX-STRING>' \
    -e SECRET_SIGN_KEY='<28-CHAR HEX-STRING>' \
    bothniapp:latest

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published