first commit. added CI, Docker compose, blank client and server. used unit tests, they pass
CI / Go (build + vet + test) (push) Successful in 10m49s
CI / Web (build + lint) (push) Successful in 10m31s

This commit is contained in:
vantablackTea
2026-09-05 01:04:12 +03:00
commit 1a669c948a
30 changed files with 2208 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
# Copy to .env and adjust.
MESSENGER_ENV=production
MESSENGER_ALLOWED_ORIGINS=https://msg.example.com
POSTGRES_USER=messenger
POSTGRES_PASSWORD=change-me
POSTGRES_DB=messenger
+36
View File
@@ -0,0 +1,36 @@
services:
api:
build:
context: .
dockerfile: Dockerfile
image: messenger/api:latest
restart: unless-stopped
environment:
MESSENGER_ENV: ${MESSENGER_ENV:-production}
MESSENGER_HTTP_ADDR: ":8080"
MESSENGER_ALLOWED_ORIGINS: ${MESSENGER_ALLOWED_ORIGINS:-}
ports:
- "8080:8080"
depends_on:
postgres:
condition: service_healthy
postgres:
image: postgres:17-alpine
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER:-messenger}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-messenger}
POSTGRES_DB: ${POSTGRES_DB:-messenger}
volumes:
- pgdata:/var/lib/postgresql/data
ports:
- "127.0.0.1:5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-messenger} -d ${POSTGRES_DB:-messenger}"]
interval: 5s
timeout: 3s
retries: 10
volumes:
pgdata: