Bluesky feed server - NSFW Likes

wip: Container and Fly.io deployment

Changed files
+48 -5
app
src
main
+8
.containerignore
··· 1 + .gradle/ 2 + .kotlin/ 3 + */build/ 4 + .containerignore 5 + .gitattributes 6 + .gitignore 7 + fly.toml 8 + Containerfile
+1
.gitignore
··· 1 1 .gradle/ 2 2 .kotlin/ 3 3 */build/ 4 + local.env
+8
Containerfile
··· 1 + FROM registry.access.redhat.com/ubi8/openjdk-21 AS build 2 + WORKDIR /build 3 + COPY --chown=jboss / . 4 + RUN ./gradlew --no-daemon :app:installDist 5 + 6 + FROM registry.access.redhat.com/ubi8/openjdk-21 7 + COPY --from=build /build/app/build/install/app /app 8 + ENTRYPOINT /app/bin/app
+4 -5
app/src/main/kotlin/Application.kt
··· 29 29 const val FEED_RECORD_KEY = "darkfeed" 30 30 31 31 fun main() { 32 - // TODO: Move this to an env file! 33 - val hostname = "" 34 - val ownerPds = "" 35 - val ownerDid = "" 36 - val ownerAppPassword = "" 32 + val ownerPds = System.getenv("DF_OWNER_PDS") 33 + val ownerDid = System.getenv("DF_OWNER_DID") 34 + val ownerAppPassword = System.getenv("DF_OWNER_PASSWORD") 35 + val hostname = System.getenv("DF_HOSTNAME") 37 36 38 37 val api = BskyApi( 39 38 pdsUrl = buildUrl {
+27
fly.toml
··· 1 + # fly.toml app configuration file generated for darkfeed on 2024-11-05T20:07:05-05:00 2 + # 3 + # See https://fly.io/docs/reference/configuration/ for information about how to use this file. 4 + # 5 + 6 + app = 'darkfeed' 7 + primary_region = 'iad' 8 + 9 + [build] 10 + dockerfile = 'Containerfile' 11 + ignorefile = '.containerignore' 12 + 13 + [http_service] 14 + internal_port = 8080 15 + force_https = true 16 + auto_stop_machines = 'stop' 17 + auto_start_machines = true 18 + min_machines_running = 0 19 + processes = ['app'] 20 + 21 + [[vm]] 22 + size = 'shared-cpu-1x' 23 + 24 + [env] 25 + DF_OWNER_PDS = 'bsky.social' 26 + DF_OWNER_DID = 'did:plc:zhxv5pxpmojhnvaqy4mwailv' 27 + DF_HOSTNAME = 'darkfeed.fly.dev'