Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7162834b43 | ||
|
|
7a6b3b9378 |
No files matched your search
@@ -0,0 +1,121 @@
|
||||
name: Test Setup Scripts
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
test-bash:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.x'
|
||||
|
||||
- name: Start local HTTP server
|
||||
run: |
|
||||
python3 -m http.server 8080 &
|
||||
sleep 2 # Wait for server to start
|
||||
|
||||
- name: Patch setup.sh to use local server
|
||||
run: |
|
||||
sed -i 's|https://raw.githubusercontent.com/silvertakana/worldwideview/main|http://localhost:8080|g' self-host/setup.sh
|
||||
|
||||
- name: Run setup.sh
|
||||
run: |
|
||||
cd self-host
|
||||
bash setup.sh
|
||||
|
||||
- name: Verify .env generation
|
||||
run: |
|
||||
cd self-host
|
||||
if [ ! -f .env ]; then
|
||||
echo ".env file was not created"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! grep -q "^AUTH_SECRET=[a-f0-9]\{64\}$" .env; then
|
||||
echo "AUTH_SECRET was not generated correctly or is missing"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Verify docker-compose.yml download
|
||||
run: |
|
||||
cd self-host
|
||||
if [ ! -f docker-compose.yml ]; then
|
||||
echo "docker-compose.yml was not downloaded"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Verify Docker containers are running
|
||||
run: |
|
||||
cd self-host
|
||||
docker compose ps
|
||||
if ! docker compose ps | grep -q "Up"; then
|
||||
echo "Docker containers failed to start"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
test-powershell:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.x'
|
||||
|
||||
- name: Start local HTTP server
|
||||
run: |
|
||||
python3 -m http.server 8080 &
|
||||
sleep 2 # Wait for server to start
|
||||
|
||||
- name: Patch setup.ps1 to use local server
|
||||
run: |
|
||||
sed -i 's|https://raw.githubusercontent.com/silvertakana/worldwideview/main|http://localhost:8080|g' self-host/setup.ps1
|
||||
|
||||
- name: Run setup.ps1
|
||||
run: |
|
||||
cd self-host
|
||||
pwsh ./setup.ps1
|
||||
|
||||
- name: Verify .env generation
|
||||
run: |
|
||||
cd self-host
|
||||
if [ ! -f .env ]; then
|
||||
echo ".env file was not created"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! grep -q "^AUTH_SECRET=[a-f0-9]\{64\}$" .env; then
|
||||
echo "AUTH_SECRET was not generated correctly or is missing"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Verify docker-compose.yml download
|
||||
run: |
|
||||
cd self-host
|
||||
if [ ! -f docker-compose.yml ]; then
|
||||
echo "docker-compose.yml was not downloaded"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Verify Docker containers are running
|
||||
run: |
|
||||
cd self-host
|
||||
docker compose ps
|
||||
if ! docker compose ps | grep -q "Up"; then
|
||||
echo "Docker containers failed to start"
|
||||
exit 1
|
||||
fi
|
||||
@@ -87,13 +87,13 @@ WorldWideView uses a multi-stage Dockerfile designed for standalone output. To d
|
||||
**Mac/Linux:**
|
||||
```bash
|
||||
mkdir worldwideview && cd worldwideview
|
||||
curl -fsSL https://raw.githubusercontent.com/silvertakana/worldwideview/main/setup.sh | bash
|
||||
curl -fsSL https://raw.githubusercontent.com/silvertakana/worldwideview/main/self-host/setup.sh | bash
|
||||
```
|
||||
|
||||
**Windows (PowerShell):**
|
||||
```powershell
|
||||
mkdir worldwideview; cd worldwideview
|
||||
Invoke-WebRequest -Uri https://raw.githubusercontent.com/silvertakana/worldwideview/main/setup.ps1 -UseBasicParsing | Invoke-Expression
|
||||
Invoke-WebRequest -Uri https://raw.githubusercontent.com/silvertakana/worldwideview/main/self-host/setup.ps1 -UseBasicParsing | Invoke-Expression
|
||||
```
|
||||
|
||||
> [!NOTE]
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
services:
|
||||
wwv:
|
||||
build:
|
||||
context: .
|
||||
args:
|
||||
- NEXT_PUBLIC_WWV_EDITION=${NEXT_PUBLIC_WWV_EDITION:-local}
|
||||
- NEXT_PUBLIC_WWV_PLUGIN_DATA_ENGINE_URL=${NEXT_PUBLIC_WWV_PLUGIN_DATA_ENGINE_URL:-}
|
||||
- NEXT_PUBLIC_SUPABASE_URL=${NEXT_PUBLIC_SUPABASE_URL:-}
|
||||
- NEXT_PUBLIC_SUPABASE_ANON_KEY=${NEXT_PUBLIC_SUPABASE_ANON_KEY:-}
|
||||
- NEXT_PUBLIC_GOOGLE_MAPS_API_KEY=${NEXT_PUBLIC_GOOGLE_MAPS_API_KEY:-}
|
||||
- NEXT_PUBLIC_BING_MAPS_KEY=${NEXT_PUBLIC_BING_MAPS_KEY:-}
|
||||
- NEXT_PUBLIC_CESIUM_ION_TOKEN=${NEXT_PUBLIC_CESIUM_ION_TOKEN:-}
|
||||
- NEXT_PUBLIC_ADSENSE_CLIENT_ID=${NEXT_PUBLIC_ADSENSE_CLIENT_ID:-}
|
||||
pull_policy: build
|
||||
ports:
|
||||
- "3000:3000"
|
||||
|
||||
db:
|
||||
profiles:
|
||||
- "${WWV_SKIP_LOCAL_DB:-}"
|
||||
ports:
|
||||
- "5432:5432"
|
||||
|
||||
wwv-data-engine:
|
||||
command: >
|
||||
sh -c "
|
||||
echo 'Syncing workspace dependencies...' &&
|
||||
cd $$SEEDERS_DIR/community && CI=true pnpm install --ignore-scripts && pnpm -r rebuild better-sqlite3 esbuild &&
|
||||
if [ -d \"$$SEEDERS_DIR/private\" ]; then cd $$SEEDERS_DIR/private && CI=true pnpm install --ignore-scripts && pnpm -r rebuild better-sqlite3 esbuild; fi &&
|
||||
cd /app && node dist/server.js"
|
||||
ports:
|
||||
- "5000:5000"
|
||||
|
||||
networks:
|
||||
coolify:
|
||||
external: true
|
||||
+12
-6
@@ -1,6 +1,5 @@
|
||||
services:
|
||||
wwv:
|
||||
image: ghcr.io/silvertakana/worldwideview:latest
|
||||
build:
|
||||
context: .
|
||||
args:
|
||||
@@ -16,6 +15,7 @@ services:
|
||||
- "3000:3000"
|
||||
volumes:
|
||||
- wwv-data:/app/data
|
||||
- ./public/plugins-local:/app/public/plugins-local:ro
|
||||
env_file:
|
||||
- path: .env
|
||||
required: false
|
||||
@@ -55,20 +55,22 @@ services:
|
||||
|
||||
wwv-data-engine:
|
||||
image: ghcr.io/silvertakana/wwv-data-engine:latest
|
||||
command: >
|
||||
sh -c "
|
||||
echo 'Syncing workspace dependencies...' &&
|
||||
cd $$SEEDERS_DIR/community && CI=true pnpm install --ignore-scripts && pnpm -r rebuild better-sqlite3 esbuild &&
|
||||
if [ -d \"$$SEEDERS_DIR/private\" ]; then cd $$SEEDERS_DIR/private && CI=true pnpm install --ignore-scripts && pnpm -r rebuild better-sqlite3 esbuild; fi &&
|
||||
cd /app && node dist/server.js"
|
||||
ports:
|
||||
- "5000:5000"
|
||||
environment:
|
||||
- PORT=5000
|
||||
- REDIS_URL=redis://wwv-redis:6379
|
||||
- SEEDERS_DIR=/mnt/host/c/dev/worldwideview/local-seeders
|
||||
- SKIP_SEEDER_DOWNLOAD=true
|
||||
- SEEDERS_DIR=/app/seeders
|
||||
- DB_PATH=/app/data/engine.db
|
||||
depends_on:
|
||||
wwv-redis:
|
||||
condition: service_healthy
|
||||
volumes:
|
||||
- ../wwv-seeders:/mnt/host/c/dev/worldwideview/local-seeders/community
|
||||
- ../wwv-seeders-private:/mnt/host/c/dev/worldwideview/local-seeders/private
|
||||
restart: unless-stopped
|
||||
profiles:
|
||||
- engine
|
||||
@@ -83,6 +85,10 @@ services:
|
||||
profiles:
|
||||
- engine
|
||||
|
||||
networks:
|
||||
coolify:
|
||||
external: true
|
||||
|
||||
volumes:
|
||||
wwv-data:
|
||||
postgres-data:
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "worldwideview",
|
||||
"version": "2.9.2",
|
||||
"version": "2.9.3",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"packageManager": "[email protected]",
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
services:
|
||||
wwv:
|
||||
image: ghcr.io/silvertakana/worldwideview:latest
|
||||
ports:
|
||||
- "3000:3000"
|
||||
volumes:
|
||||
- wwv-data:/app/data
|
||||
- ./public/plugins-local:/app/public/plugins-local:ro
|
||||
env_file:
|
||||
- path: .env
|
||||
required: false
|
||||
environment:
|
||||
- "AUTH_SECRET=${AUTH_SECRET:-default_secret_for_local_dev}"
|
||||
- "WWV_DEMO_ADMIN_SECRET=${WWV_DEMO_ADMIN_SECRET:-}"
|
||||
- "WWV_BRIDGE_TOKEN=${WWV_BRIDGE_TOKEN:-}"
|
||||
- "DATABASE_URL=postgresql://postgres:postgres@db:5432/worldwideview?schema=public"
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:3000/api/health || exit 1"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 30s
|
||||
restart: unless-stopped
|
||||
|
||||
db:
|
||||
image: postgres:15-alpine
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
POSTGRES_DB: worldwideview
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- postgres-data:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U postgres -d worldwideview"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 60s
|
||||
|
||||
wwv-data-engine:
|
||||
image: ghcr.io/silvertakana/wwv-data-engine:latest
|
||||
ports:
|
||||
- "5000:5000"
|
||||
environment:
|
||||
- PORT=5000
|
||||
- REDIS_URL=redis://wwv-redis:6379
|
||||
- SEEDERS_DIR=/app/seeders
|
||||
- DB_PATH=/app/data/engine.db
|
||||
depends_on:
|
||||
wwv-redis:
|
||||
condition: service_healthy
|
||||
restart: unless-stopped
|
||||
profiles:
|
||||
- engine
|
||||
|
||||
wwv-redis:
|
||||
image: redis:7-alpine
|
||||
healthcheck:
|
||||
test: ['CMD', 'redis-cli', 'ping']
|
||||
interval: 5s
|
||||
timeout: 3s
|
||||
retries: 5
|
||||
profiles:
|
||||
- engine
|
||||
|
||||
volumes:
|
||||
wwv-data:
|
||||
postgres-data:
|
||||
@@ -21,7 +21,7 @@ try {
|
||||
|
||||
# Generate docker-compose.yml
|
||||
Write-Host "[*] Downloading docker-compose.yml..."
|
||||
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/silvertakana/worldwideview/main/docker-compose.yml" -OutFile docker-compose.yml
|
||||
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/silvertakana/worldwideview/main/self-host/docker-compose.yml" -OutFile docker-compose.yml
|
||||
|
||||
# Generate .env
|
||||
if (-Not (Test-Path .env)) {
|
||||
Executable → Regular
+1
-1
@@ -19,7 +19,7 @@ fi
|
||||
|
||||
# 1. Download docker-compose.yml
|
||||
echo "📦 Downloading docker-compose.yml..."
|
||||
curl -fsSL -o docker-compose.yml https://raw.githubusercontent.com/silvertakana/worldwideview/main/docker-compose.yml
|
||||
curl -fsSL -o docker-compose.yml https://raw.githubusercontent.com/silvertakana/worldwideview/main/self-host/docker-compose.yml
|
||||
|
||||
# 2. Generate .env with a persistent secret
|
||||
if [ ! -f .env ]; then
|
||||
Reference in new issue
Block a user