build: add makefile, dockerfile, ci and development stack

- build: add makefile, dockerfile, ci and development stack
- feat(config): add environment configuration and logger
- feat(server): add server lifecycle with health and version routes
- feat(db): add connection, contract check, migrations and stores
- feat(cli): add command dispatch and user management
- test(db): add integration tests against mysql
This commit is contained in:
bryanpedini committed 2026-11-19 15:46:12 +01:00
1 parent 45d1e307c6
commit 7089a6f408
46 files changed
+8456

No files matched your search

Executable
+35
View File
@@ -0,0 +1,35 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2026 Bryan Joshua Pedini
ENVIRONMENTS=($DEPLOYMENT_PATHS)
if [ -z "${DEPLOYMENT_PATH}" ]; then
if [ "${#ENVIRONMENTS[@]}" -gt 1 ]; then
for i in "${!ENVIRONMENTS[@]}"; do
echo "$i: ${ENVIRONMENTS[$i]}"
done
read -p "Deployment environment: " DEPLOYMENT_ENVIRONMENT
fi
if [ -z "${DEPLOYMENT_ENVIRONMENT}" ]; then
DEPLOYMENT_ENVIRONMENT=0
fi
DEPLOYMENT_PATH="${ENVIRONMENTS[$DEPLOYMENT_ENVIRONMENT]}"
fi
if [ -z "${DEPLOYMENT_VERSION}" ]; then
read -p "Version [latest]: " DEPLOYMENT_VERSION
if [ -z "${DEPLOYMENT_VERSION}" ]; then
DEPLOYMENT_VERSION=latest
fi
fi
echo "${DEPLOYMENT_PATH}"
echo "${DEPLOYMENT_VERSION}"
ssh "$DEPLOYMENT_HOST" \
"cd ${DEPLOYMENT_PATH} && \
git pull && \
sed -i 's/VERSION=.*/VERSION=${DEPLOYMENT_VERSION}/' .env && \
docker compose pull && \
docker compose up -d"