use postgres as backend

This commit is contained in:
Sebastian Hugentobler 2023-03-05 11:55:41 +01:00
parent d94db7184c
commit 61ed1617d8
Signed by: shu
GPG Key ID: BB32CF3CA052C2F0
5 changed files with 36 additions and 9 deletions

View File

@ -1,6 +1,6 @@
FROM docker.io/alpine:3.16 AS builder FROM docker.io/alpine:3.17 AS builder
ENV VERSION=11.0.0-SNAPSHOT.20220625052932 ENV VERSION=11.0.0-SNAPSHOT.20230217142243
RUN apk add --no-cache \ RUN apk add --no-cache \
openjdk17-jdk \ openjdk17-jdk \
maven \ maven \
@ -13,18 +13,18 @@ RUN git checkout "$VERSION"
RUN mvn package -DskipTests RUN mvn package -DskipTests
FROM docker.io/thallian/alpine-s6:3.16 FROM docker.io/thallian/confd-env:3.17-3.1.3.0
ENV JAVA_OPTIONS=-Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8 ENV JAVA_OPTIONS=-Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8
ENV AIRSONIC_DIR=/home/airsonic ENV AIRSONIC_DIR=/home/airsonic
RUN apk add --no-cache \ RUN apk add --no-cache \
ca-certificates \ ca-certificates \
openssl \ openssl \
ffmpeg \ ffmpeg \
flac \ flac \
opus \ opus \
lame \ lame \
openjdk17-jre-headless openjdk17-jre-headless
RUN addgroup -g 2222 airsonic RUN addgroup -g 2222 airsonic

View File

@ -6,5 +6,19 @@
- `/home/airsonic/playlists` - `/home/airsonic/playlists`
- `/home/airsonic/podcasts` - `/home/airsonic/podcasts`
# Environment Variables
## DB_URL
JDBC url for the postgres conection.
## DB_USER
- default: airsonic
Username with which to connect to the database.
## DB_PASSWORD
Password for the databse connection.
# Ports # Ports
- 8080 - 8080

View File

@ -0,0 +1,6 @@
[template]
src = "airsonic.properties.tmpl"
dest = "/home/airsonic/data/airsonic.properties"
gid = 2222
uid = 2222
mode = "0660"

View File

@ -0,0 +1,6 @@
spring.datasource.driver-class-name=org.postgresql.Driver
spring.datasource.url={{ getenv "DB_URL" }}
spring.datasource.username={{ getenv "DB_USER" "airsonic" }}
spring.datasource.password={{ getenv "DB_PASSWORD" }}
spring.liquibase.parameters.userTableQuote="
server.forward-headers-strategy=native

View File

@ -0,0 +1 @@
confd