From 15774d60639462c111c180ad23024ad97b874988 Mon Sep 17 00:00:00 2001 From: sherl Date: Thu, 4 Dec 2025 15:30:56 +0100 Subject: [PATCH] feat: add preliminary docker-compose and default .env --- .env.default | 21 +++++++++++++++++++++ .gitignore | 3 +++ docker-compose.yaml | 40 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 64 insertions(+) create mode 100644 .env.default create mode 100644 .gitignore create mode 100644 docker-compose.yaml diff --git a/.env.default b/.env.default new file mode 100644 index 0000000..3614a8d --- /dev/null +++ b/.env.default @@ -0,0 +1,21 @@ +# ========== Global config ========== + + +# ============= Backend ============= +BACKEND_PORT=6567 # Port on which the backend service should listen to requests. + +# Postgres and TypeORM +PG_USER=kitty +PG_PASS=CHANGEME +PG_HOST=127.0.0.1 +PG_PORT=5432 +PG_DB=kittyurl + +# Site info +PUBLIC_URL=https://example.com # Publicly accessible website root, used for rewrites. Note there is no trailing slash in the URL. +IS_PROXIED=false # Set to `true` if behind a reverse proxy, like apache/nginx. +USE_SUBDOMAINS=true # Whether to use subdomains for URL generation. +DEBUG=false # Set to `false` to disable some features not meant to be seen publicly (like swagger documentation). + +# ============ Frontend ============ +FRONTEND_PORT=6568 # Port on which the frontend service should listen to requests. diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..55f7525 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +# .env +.env + diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..967870b --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,40 @@ +# kittyurl docker compose config +# +# Tip: Please do not change values listed here. Instead, modify your .env file. + +name: kittyurl +services: + + # kittyfe: + # container_name: frontend + # image: gitea.7o7.cx/kittyteam/kittyfe:${KITTY_VERSION:-master-latest} + # env_file: + # - .env + # ports: + # - ${FRONTEND_PORT}:6568 + # depends_on: + # - kittybe + # restart: unless-stopped + + kittybe: + container_name: backend + image: gitea.7o7.cx/kittyteam/kittybe:${KITTY_VERSION:-master-latest} + env_file: + - .env + ports: + - ${BACKEND_PORT}:6567 + depends_on: + - postgres + restart: unless-stopped + + postgres: + container_name: database + image: "postgres:17.2" + # Uncomment to expose DB port: + # ports: + # - '5432:5432' + environment: + POSTGRES_USER: ${PG_USER} + POSTGRES_PASSWORD: ${PG_PASS} + POSTGRES_DB: ${PG_DB} +