Refactored.

This commit is contained in:
Bartlomiej Mika 2025-12-02 22:48:40 -05:00
parent f4a49ad4b9
commit 9dad75464b
37 changed files with 667 additions and 247 deletions

View file

@ -106,7 +106,7 @@ LOGGER_FORMAT=console
# For running OUTSIDE Docker:
# Change to: MEILISEARCH_HOST=http://localhost:7700
MEILISEARCH_HOST=http://meilisearch:7700
MEILISEARCH_API_KEY=maple-dev-master-key-change-in-production
MEILISEARCH_API_KEY=mapleopentech-dev-master-key-change-in-production
MEILISEARCH_INDEX_PREFIX=site_
# ============================================================================

View file

@ -319,7 +319,7 @@ JWT tokens expire after 60 minutes. Re-run the [registration step](#testing-the-
**Verify:**
```bash
docker exec maple-wordpress-dev curl http://maplepress-backend-dev:8000/health
docker exec mapleopentech-wordpress-dev curl http://maplepress-backend-dev:8000/health
```
## 🛠️ Technology Stack

View file

@ -50,7 +50,7 @@ tasks:
silent: true
cmds:
- |
if ! docker network inspect maple-dev >/dev/null 2>&1; then
if ! docker network inspect mapleopentech-dev >/dev/null 2>&1; then
echo "❌ Infrastructure not running!"
echo ""
echo "Start it with:"
@ -58,7 +58,7 @@ tasks:
echo ""
exit 1
fi
if ! docker ps | grep -q maple-cassandra-1-dev; then
if ! docker ps | grep -q mapleopentech-cassandra-1-dev; then
echo "❌ Cassandra not running!"
echo ""
echo "Start it with:"
@ -89,7 +89,7 @@ tasks:
deps: [build]
cmds:
- echo "⚠️ Dropping keyspace 'maplepress'..."
- docker exec maple-cassandra-1-dev cqlsh -e "DROP KEYSPACE IF EXISTS maplepress;"
- docker exec mapleopentech-cassandra-1-dev cqlsh -e "DROP KEYSPACE IF EXISTS maplepress;"
- echo "✅ Keyspace dropped"
- echo "🔄 Running migrations to recreate schema..."
- ./maplepress-backend migrate up

View file

@ -1,6 +1,6 @@
# Use external network from infrastructure
networks:
maple-dev:
mapleopentech-dev:
external: true
services:
@ -41,7 +41,7 @@ services:
# Meilisearch Configuration (if needed)
MEILISEARCH_HOST: ${MEILISEARCH_HOST:-http://meilisearch:7700}
MEILISEARCH_API_KEY: ${MEILISEARCH_API_KEY:-maple-dev-master-key-change-in-production}
MEILISEARCH_API_KEY: ${MEILISEARCH_API_KEY:-mapleopentech-dev-master-key-change-in-production}
# S3 Configuration (SeaweedFS - S3-compatible storage)
AWS_ACCESS_KEY: ${AWS_ACCESS_KEY:-any}
@ -63,10 +63,18 @@ services:
volumes:
- ./:/go/src/codeberg.org/mapleopentech/monorepo/cloud/maplepress-backend
networks:
- maple-dev
- mapleopentech-dev
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "-H", "X-Tenant-ID: healthcheck", "http://localhost:${SERVER_PORT:-8000}/health"]
test:
[
"CMD",
"curl",
"-f",
"-H",
"X-Tenant-ID: healthcheck",
"http://localhost:${SERVER_PORT:-8000}/health",
]
interval: 30s
timeout: 5s
retries: 3

View file

@ -2596,7 +2596,7 @@ CMD ["/app/app-backend", "daemon"]
```yaml
# Use external network from shared infrastructure
networks:
maple-dev:
mapleopentech-dev:
external: true
services:
@ -2640,7 +2640,7 @@ services:
volumes:
- ./:/go/src/codeberg.org/mapleopentech/monorepo/cloud/your-backend-name
networks:
- maple-dev
- mapleopentech-dev
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:${SERVER_PORT:-8000}/health"]

View file

@ -212,7 +212,7 @@ curl -X POST http://localhost:8000/api/v1/login \
**Verify from WordPress container**:
```bash
docker exec maple-wordpress-dev curl http://maplepress-backend-dev:8000/health
docker exec mapleopentech-wordpress-dev curl http://maplepress-backend-dev:8000/health
# Should return: {"status":"healthy"}
```
@ -322,8 +322,8 @@ task build # Build binary (only for manual operations)
task migrate:up # Manual migration (only if needed)
# View infrastructure logs
docker logs maple-cassandra-1-dev # Cassandra logs
docker logs maple-redis-dev # Redis logs
docker logs mapleopentech-cassandra-1-dev # Cassandra logs
docker logs mapleopentech-redis-dev # Redis logs
```
---