Image archive application written using Ktor and Freemarker.
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.
# macOS & Linux
./gradlew build
# Windows
gradlew.bat build
docker build -t bothniapp:latest .
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 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