diff --git a/README_DOCKER.md b/README_DOCKER.md deleted file mode 100644 index 73f7859..0000000 --- a/README_DOCKER.md +++ /dev/null @@ -1,24 +0,0 @@ -### Running locally with Docker - -Prerequisites: Docker and Docker Compose. - -1. Build and start the full stack (Postgres, Redis, Web): - -``` -docker compose up --build -``` - -2. Configure BigQuery credentials via environment variables (e.g., export `GOOGLE_PROJECT_ID` and `GOOGLE_APPLICATION_CREDENTIALS_JSON`). For local compose, you can add them under the `web.environment` section in `docker-compose.yml`. - -3. The app runs on `http://localhost:3000`. - -Environment variables of interest: -- `DATABASE_URL`: Postgres connection string. -- `REDIS_URL`: Redis URL. -- `ENABLE_CRON`: Set to `true` to run the daily ETL. -- `CRON_SCHEDULE`: Cron string (default 2 AM UTC daily). -- `GOOGLE_PROJECT_ID`, `GOOGLE_APPLICATION_CREDENTIALS_JSON` or `GOOGLE_APPLICATION_CREDENTIALS` for BigQuery. - -The container entrypoint waits for Postgres, applies Prisma migrations, then starts the app. - - diff --git a/docker-compose.yml b/docker-compose.yml index d918118..e71fc67 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,7 +4,7 @@ services: environment: POSTGRES_DB: pypistats POSTGRES_USER: pypistats - POSTGRES_PASSWORD: ${SERVICE_PASSWORD_POSTGRES} + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} volumes: - pgdata:/var/lib/postgresql/data ports: @@ -18,12 +18,12 @@ services: redis: image: redis:latest environment: - SERVICE_PASSWORD_REDIS: ${SERVICE_PASSWORD_REDIS} - command: [ "redis-server", "--requirepass", "${SERVICE_PASSWORD_REDIS}" ] + REDIS_PASSWORD: ${REDIS_PASSWORD} + command: [ "redis-server", "--requirepass", "${REDIS_PASSWORD}" ] ports: - "6379:6379" healthcheck: - test: [ "CMD-SHELL", "redis-cli -a $SERVICE_PASSWORD_REDIS ping" ] + test: [ "CMD-SHELL", "redis-cli -a $REDIS_PASSWORD ping" ] interval: 5s timeout: 5s retries: 20 @@ -32,7 +32,7 @@ services: build: context: . args: - DATABASE_URL: postgresql://pypistats:${SERVICE_PASSWORD_POSTGRES}@db:5432/pypistats?schema=public + DATABASE_URL: postgresql://pypistats:${POSTGRES_PASSWORD}@db:5432/pypistats?schema=public depends_on: db: condition: service_healthy @@ -41,13 +41,10 @@ services: environment: NODE_ENV: production PORT: 3000 - SERVICE_PASSWORD_POSTGRES: ${SERVICE_PASSWORD_POSTGRES} - SERVICE_PASSWORD_REDIS: ${SERVICE_PASSWORD_REDIS} - DATABASE_URL: postgresql://pypistats:${SERVICE_PASSWORD_POSTGRES}@db:5432/pypistats?schema=public - REDIS_URL: redis://:${SERVICE_PASSWORD_REDIS}@redis:6379 - GOOGLE_PROJECT_ID: ${SERVICE_GOOGLE_PROJECT_ID} - GOOGLE_APPLICATION_CREDENTIALS_JSON: ${SERVICE_GOOGLE_CREDENTIALS} - SERVICE_FQDN_WEB_3000: "" # Coolify will generate the public URL + SERVICE_PASSWORD_POSTGRES: ${POSTGRES_PASSWORD} + SERVICE_PASSWORD_REDIS: ${REDIS_PASSWORD} + DATABASE_URL: postgresql://pypistats:${POSTGRES_PASSWORD}@db:5432/pypistats?schema=public + REDIS_URL: redis://:${REDIS_PASSWORD}@redis:6379 ports: - "3000:3000" command: [ "sh", "-c", "bun run prisma migrate deploy && bun run build/index.js" ] diff --git a/src/routes/admin/+page.svelte b/src/routes/admin/+page.svelte deleted file mode 100644 index 5eb3f3c..0000000 --- a/src/routes/admin/+page.svelte +++ /dev/null @@ -1,324 +0,0 @@ - - - - Admin Dashboard - PyPI Stats - - -
-
-
-

Not Found

-

The admin dashboard has been removed.

-

Return to homepage

-
- - {#if error} -
-
-
- - - -
-
-

Error

-
{error}
-
-
-
- {/if} - -
- -
-

Data Processing

- -
-
- - -
- -
- - -
- -
- - - -
-
- - {#if results} -
-

Results

-
-
{JSON.stringify(results, null, 2)}
-
-
- {/if} -
- - - - -
-

Cache Management

- -
-
- - -
- -
- - - - - -
-
- - {#if cacheInfo} -
-

Cache Information

-
-
{JSON.stringify(cacheInfo, null, 2)}
-
-
- {/if} -
-
- - -
-

Environment Information

- -
-
-

Database

-

- {typeof process !== 'undefined' && process.env.DATABASE_URL ? 'Configured' : 'Not configured'} -

-
- -
-

Google Cloud

-

- {typeof process !== 'undefined' && process.env.GOOGLE_PROJECT_ID ? 'Configured' : 'Not configured'} -

-
- -
-

Redis

-

- {typeof process !== 'undefined' && process.env.REDIS_URL ? 'Configured' : 'Not configured'} -

-
- -
-

Environment

-

- {typeof process !== 'undefined' ? process.env.NODE_ENV || 'development' : 'development'} -

-
-
-
-
-
\ No newline at end of file diff --git a/src/routes/admin/+page.ts b/src/routes/admin/+page.ts deleted file mode 100644 index e69de29..0000000