refactor: flatten monorepo structure to backend/ frontend/ devops/
Rename subdirectories for a cleaner single-repo layout: - website-monitoring-backend/ → backend/ - website-monitoring-frontend/ → frontend/ - website-monitoring-devops/ → devops/ Update all references in package.json scripts, CI workflows, docker-compose, pre-commit hooks, and documentation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"name": "Website Monitoring Development",
|
||||
"image": "mcr.microsoft.com/devcontainers/javascript-node:0-18",
|
||||
"workspaceFolder": "/workspaces/devops",
|
||||
|
||||
// Dies funktioniert sowohl lokal als auch in Codespaces
|
||||
"workspaceMount": "source=${localWorkspaceFolder}/..,target=/workspaces,type=bind,consistency=cached",
|
||||
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"extensions": [
|
||||
"dbaeumer.vscode-eslint",
|
||||
"esbenp.prettier-vscode",
|
||||
"bradlc.vscode-tailwindcss",
|
||||
"ms-vscode.vscode-typescript-next"
|
||||
],
|
||||
"settings": {
|
||||
"terminal.integrated.defaultProfile.linux": "bash"
|
||||
}
|
||||
}
|
||||
},
|
||||
"forwardPorts": [3000, 5000],
|
||||
"remoteEnv": {
|
||||
"NEXT_PUBLIC_SUPABASE_URL": "${localEnv:NEXT_PUBLIC_SUPABASE_URL}",
|
||||
"NEXT_PUBLIC_SUPABASE_ANON_KEY": "${localEnv:NEXT_PUBLIC_SUPABASE_ANON_KEY}"
|
||||
},
|
||||
|
||||
// Setup-Script (funktioniert in beiden Umgebungen)
|
||||
"postCreateCommand": "bash ./.devcontainer/setup-repos.sh",
|
||||
|
||||
// Öffnet den Workspace nach dem Verbinden
|
||||
"postAttachCommand": {
|
||||
"Open Workspace": "code ./.vscode/workspace.code-workspace"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Working directory setup
|
||||
cd /workspaces
|
||||
|
||||
# Clone repositories if they don't exist
|
||||
if [ ! -d "/workspaces/frontend" ]; then
|
||||
echo "Cloning Frontend repository..."
|
||||
git clone https://github.com/DEINUSERNAME/website-monitoring-frontend /workspaces/frontend
|
||||
fi
|
||||
|
||||
if [ ! -d "/workspaces/backend" ]; then
|
||||
echo "Cloning Backend repository..."
|
||||
git clone https://github.com/DEINUSERNAME/website-monitoring-backend /workspaces/backend
|
||||
fi
|
||||
|
||||
# Install dependencies
|
||||
echo "Installing frontend dependencies..."
|
||||
cd /workspaces/frontend
|
||||
npm install
|
||||
|
||||
echo "Installing backend dependencies..."
|
||||
cd /workspaces/backend
|
||||
npm install
|
||||
|
||||
echo "Workspace setup complete!"
|
||||
@@ -0,0 +1,65 @@
|
||||
services:
|
||||
db:
|
||||
image: postgres:16-alpine
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_USER: ${POSTGRES_USER:-monitoring}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-monitoring_pass}
|
||||
POSTGRES_DB: ${POSTGRES_DB:-monitoring}
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-monitoring}"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
backend:
|
||||
build:
|
||||
context: ../backend
|
||||
dockerfile: Dockerfile
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "5000:5000"
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
PORT: 5000
|
||||
DATABASE_URL: postgresql://${POSTGRES_USER:-monitoring}:${POSTGRES_PASSWORD:-monitoring_pass}@db:5432/${POSTGRES_DB:-monitoring}
|
||||
CORS_ORIGIN: http://localhost:3000
|
||||
CHROME_PATH: /usr/bin/chromium
|
||||
NODE_ENV: production
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "curl -f http://localhost:5000/health || exit 1"]
|
||||
interval: 15s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 30s
|
||||
|
||||
frontend:
|
||||
build:
|
||||
context: ../frontend
|
||||
dockerfile: Dockerfile
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "3000:3000"
|
||||
depends_on:
|
||||
backend:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
NEXT_PUBLIC_API_URL: http://backend:5000
|
||||
NEXT_PUBLIC_SUPABASE_URL: ${NEXT_PUBLIC_SUPABASE_URL:-}
|
||||
NEXT_PUBLIC_SUPABASE_ANON_KEY: ${NEXT_PUBLIC_SUPABASE_ANON_KEY:-}
|
||||
NODE_ENV: production
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "curl -f http://localhost:3000 || exit 1"]
|
||||
interval: 15s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 60s
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
Reference in New Issue
Block a user