For now? I'm experimenting on an old concept.
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: add Docker support with PostgreSQL and SQLite configurations

+187 -6
+29
.dockerignore
··· 1 + # Ignore git and build files 2 + .git 3 + .gitignore 4 + *.log 5 + *.tmp 6 + *.swp 7 + *.swo 8 + *.bak 9 + *.DS_Store 10 + 11 + # Rust build output 12 + target/ 13 + 14 + # Node/Bun/Gleam build output 15 + client/build/ 16 + client/node_modules/ 17 + client/bun.lockb 18 + 19 + # Editor/IDE files 20 + .vscode/ 21 + .idea/ 22 + 23 + # Misc 24 + *.env.local 25 + .envrc 26 + .env.*.local 27 + 28 + docker/ 29 + data/
+2 -2
Cargo.lock
··· 232 232 233 233 [[package]] 234 234 name = "cynthia_con" 235 - version = "0.1.2" 235 + version = "0.1.3" 236 236 source = "registry+https://github.com/rust-lang/crates.io-index" 237 - checksum = "8b32bacbfe19e6f1e20d22051bb617eb55c9848879e9c987bb8a68d7cc3b80ae" 237 + checksum = "f3f10b36fd1aa4cc59bc8b144a1e85cca666a882dbfecfead92b305066e6e695" 238 238 dependencies = [ 239 239 "termsize", 240 240 ]
+39
Dockerfile
··· 1 + # syntax=docker/dockerfile:1 2 + 3 + FROM alpine:3.19 AS builder 4 + 5 + ARG optimize_build 6 + ENV MISE_DATA_DIR="/mise" 7 + ENV MISE_CONFIG_DIR="/mise" 8 + ENV MISE_CACHE_DIR="/mise/cache" 9 + ENV MISE_INSTALL_PATH="/usr/local/bin/mise" 10 + ENV BUN_INSTALL="/usr/local/bin/bun" 11 + ENV PATH="/usr/local/bin/bun/bin:/mise/shims:$PATH" 12 + 13 + RUN apk add --no-cache curl git unzip build-base bash 14 + 15 + SHELL ["/bin/bash", "-o", "pipefail", "-c"] 16 + 17 + RUN curl https://mise.run | sh 18 + 19 + WORKDIR /app 20 + COPY . . 21 + RUN curl -fsSL https://bun.sh/install | bash 22 + RUN mise trust && mise unuse bun && mise install 23 + RUN mkdir -p target/output && \ 24 + if [ "$optimize_build" = "true" ]; then \ 25 + mise run build-server-release && \ 26 + cp ./target/release/lumina-server ./target/output/; \ 27 + else \ 28 + mise run build-server && \ 29 + cp ./target/debug/lumina-server ./target/output/; \ 30 + fi 31 + 32 + 33 + # --- Final runtime image --- 34 + FROM alpine:3.19 35 + RUN apk add --no-cache ca-certificates 36 + WORKDIR /app 37 + COPY --from=builder /app/target/output/lumina-server /app/lumina-server 38 + EXPOSE 8085 39 + CMD ["/app/lumina-server"]
+35
docker-compose-postgres.yml
··· 1 + services: 2 + lumina: 3 + build: 4 + context: . 5 + dockerfile: Dockerfile 6 + args: 7 + optimize_build: "${LUMINA_DOCKER_OPTIMIZE_BUILD:-true}" 8 + image: lumina-server:latest 9 + container_name: lumina-server 10 + environment: 11 + - LUMINA_DB_TYPE=postgres 12 + - LUMINA_POSTGRES_HOST=luminadb 13 + - LUMINA_POSTGRES_PORT=5432 14 + - LUMINA_POSTGRES_USERNAME=lumina 15 + - LUMINA_POSTGRES_PASSWORD=lumina_pw 16 + - LUMINA_POSTGRES_DATABASE=lumina_config 17 + - LUMINA_SERVER_PORT=8085 18 + - LUMINA_SERVER_ADDR=0.0.0.0 19 + ports: 20 + - "8085:8085" 21 + depends_on: 22 + - db 23 + volumes: 24 + - ./priv:/app/priv 25 + db: 26 + hostname: luminadb 27 + image: postgres:16 28 + environment: 29 + POSTGRES_USER: lumina 30 + POSTGRES_PASSWORD: lumina_pw 31 + POSTGRES_DB: lumina_config 32 + ports: 33 + - "5432:5432" 34 + volumes: 35 + - ./data/postgres:/var/lib/postgresql/data
+19
docker-compose-sqlite.yml
··· 1 + 2 + services: 3 + lumina: 4 + build: 5 + context: . 6 + dockerfile: Dockerfile 7 + args: 8 + optimize_build: "${LUMINA_DOCKER_OPTIMIZE_BUILD:-true}" 9 + image: lumina-server:latest 10 + container_name: lumina-server 11 + environment: 12 + - LUMINA_DB_TYPE=sqlite 13 + - LUMINA_SQLITE_FILE=data/instance.sqlite 14 + - LUMINA_SERVER_PORT=8085 15 + - LUMINA_SERVER_ADDR=0.0.0.0 16 + ports: 17 + - "8085:8085" 18 + volumes: 19 + - ./data/:/app/data/
+63 -4
mise.toml
··· 1 1 [tools] 2 2 bun = "1.2.14" 3 - erlang = "27" 4 3 gleam = "1.11.0" 5 - rust-analyzer = "latest" 6 - taplo = "latest" 7 - watchexec = "latest" 4 + "rust" = { version = "1.87.0", components = "rust-analyzer" } 8 5 9 6 [settings] 10 7 [settings.npm] ··· 35 32 [tasks.format-metafiles] 36 33 hide = true 37 34 run = ["bun x prettier . --write", "taplo format"] 35 + tools.taplo = "latest" 38 36 39 37 [tasks.development-run] 40 38 description = "Run the server in development mode" ··· 44 42 dir = "{{cwd}}" 45 43 46 44 [tasks.development-watch] 45 + tools.watchexec = "latest" 47 46 description = "Run the server in development mode with file watching" 48 47 run = "mise watch --restart -e rs,gleam,toml,css,ts,json development-run" 49 48 ··· 81 80 description = "Build the server-side of Lumina optimised for release" 82 81 depends = ["build-client"] 83 82 run = ["cargo build --release"] 83 + 84 + [tasks.clean-all] 85 + description = "Clean all build artifacts" 86 + run = [ 87 + "cargo clean", 88 + "rm -rf ./client/node_modules", 89 + "rm -rf ./client/build", 90 + "rm -rf ./client/build/dev/javascript/lumina_client/lumina_client.mjs", 91 + "rm -rf ./client/build/dev/javascript/lumina_client/lumina_client.ts", 92 + "rm -rf ./client/priv/static/lumina_client.min.mjs", 93 + "rm -rf ./client/priv/static/lumina_client.css", 94 + ] 95 + 96 + [tasks.docker-compose-up-postgres-no-optimise] 97 + description = "Run the docker-compose file combining lumina with a postgres database, but without optimised build. [debug mode]" 98 + tools.docker-compose = "latest" 99 + env = { LUMINA_DOCKER_OPTIMIZE_BUILD = "false" } 100 + run = [ 101 + "ln -sf $HOME/.local/share/mise/installs/docker-compose/latest/docker-cli-plugin-docker-compose $HOME/.docker/cli-plugins/docker-compose", 102 + "docker compose --progress plain -f 'docker-compose-postgres.yml' up -d --build", 103 + ] 104 + [tasks.docker-compose-up-postgres] 105 + description = "Run the docker-compose file combining lumina with a postgres database." 106 + tools.docker-compose = "latest" 107 + env = { LUMINA_DOCKER_OPTIMIZE_BUILD = "true" } 108 + run = [ 109 + "ln -sf $HOME/.local/share/mise/installs/docker-compose/latest/docker-cli-plugin-docker-compose $HOME/.docker/cli-plugins/docker-compose", 110 + "docker compose -f 'docker-compose-postgres.yml' up -d --build", 111 + ] 112 + [tasks.docker-compose-up-sqlite] 113 + description = "Run the docker-compose file combining lumina with a sqlite database." 114 + tools.docker-compose = "latest" 115 + env = { LUMINA_DOCKER_OPTIMIZE_BUILD = "true" } 116 + run = [ 117 + "ln -sf $HOME/.local/share/mise/installs/docker-compose/latest/docker-cli-plugin-docker-compose $HOME/.docker/cli-plugins/docker-compose", 118 + "docker compose -f 'docker-compose-sqlite.yml' up -d --build", 119 + ] 120 + [tasks.docker-compose-up-sqlite-no-optimise] 121 + description = "Run the docker-compose file combining lumina with a sqlite database, but without optimised build. [debug mode]" 122 + tools.docker-compose = "latest" 123 + env = { LUMINA_DOCKER_OPTIMIZE_BUILD = "false" } 124 + run = [ 125 + "ln -sf $HOME/.local/share/mise/installs/docker-compose/latest/docker-cli-plugin-docker-compose $HOME/.docker/cli-plugins/docker-compose", 126 + "docker compose --progress plain -f 'docker-compose-sqlite.yml' up -d --build", 127 + ] 128 + [tasks.docker-compose-down] 129 + description = "Stop and remove the docker-compose containers" 130 + tools.docker-compose = "latest" 131 + run = [ 132 + "ln -sf $HOME/.local/share/mise/installs/docker-compose/latest/docker-cli-plugin-docker-compose $HOME/.docker/cli-plugins/docker-compose", 133 + "docker compose -f 'docker-compose-sqlite.yml' down --remove-orphans", 134 + "docker compose -f 'docker-compose-postgres.yml' down --remove-orphans", 135 + ] 136 + [tasks.docker-compose-watch-postgres-i] 137 + hide = true 138 + depends = ["docker-compose-down", "docker-compose-up-postgres-no-optimise"] 139 + [tasks.docker-compose-watch-postgres] 140 + description = "Run the docker-compose file combining lumina with a postgres database, but with file watching" 141 + tools.watchexec = "latest" 142 + run = "mise docker-compose-watch-postgres-i --restart -e rs,gleam,toml,css,ts,json docker-compose-up-postgres-no-optimise"