diff --git a/README.md b/README.md index d8f4660..a8e21fb 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,7 @@ The site is then at http://localhost:8080 (change with `WEB_PORT`). To build the docker compose --profile test run --rm emulator-tests ``` -In production, `compose.production.yaml` runs the same services from prebuilt images (`ghcr.io/project-graphite/pixelpocket/frontend` and `backend`), with resource limits and health checks. Its secrets come from the environment: `MONGO_PASSWORD`, `MINIO_ROOT_PASSWORD`, `S3_SECRET_KEY`, `JWT_SECRET`, and the `EMAIL_*` settings. +In production, [`deploy/pixelpocket/values.yaml`](https://github.com/project-graphite/platform/blob/main/deploy/pixelpocket/values.yaml) in `platform` runs the same services from prebuilt images (`ghcr.io/project-graphite/pixelpocket/frontend` and `backend`), with resource limits and health checks. It carries its own copy of `infra/minio`, so change both together. Its secrets are in the organisation's secrets repository: `MONGO_PASSWORD`, `MINIO_ROOT_PASSWORD`, `S3_SECRET_KEY`, `JWT_SECRET`, `EMAIL_HOST` and `EMAIL_FROM`, plus the optional `EMAIL_PORT`, `EMAIL_USERNAME` and `EMAIL_PASSWORD`. ## License diff --git a/compose.production.yaml b/compose.production.yaml deleted file mode 100644 index fc35895..0000000 --- a/compose.production.yaml +++ /dev/null @@ -1,133 +0,0 @@ -name: pixelpocket - -services: - mongo: - image: mongo:7 - environment: - MONGO_INITDB_ROOT_USERNAME: pixelpocket - MONGO_INITDB_ROOT_PASSWORD: ${MONGO_PASSWORD:?} - healthcheck: - test: [CMD-SHELL, "mongosh -u \"$$MONGO_INITDB_ROOT_USERNAME\" -p \"$$MONGO_INITDB_ROOT_PASSWORD\" --authenticationDatabase admin --quiet --eval \"db.adminCommand('ping')\""] - interval: 10s - timeout: 5s - retries: 10 - restart: unless-stopped - volumes: - - mongo-data:/data/db - deploy: - resources: - limits: - cpus: "0.50" - memory: 512M - - minio: - image: chainguard/minio@sha256:25bc63a89475bc494bfbce9bbeddb0421aece3f3968d77c809db5104d07b4545 - command: [server, /data] - environment: - MINIO_ROOT_USER: pixelpocket-admin - MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD:?} - healthcheck: - test: [CMD, bash, /scripts/healthcheck.sh] - interval: 10s - timeout: 5s - retries: 10 - restart: unless-stopped - volumes: - - minio-data:/data - - ./infra/minio:/scripts:ro - deploy: - resources: - limits: - cpus: "0.50" - memory: 256M - - minio-init: - image: chainguard/minio@sha256:25bc63a89475bc494bfbce9bbeddb0421aece3f3968d77c809db5104d07b4545 - entrypoint: [bash, /scripts/init.sh] - environment: - MINIO_ROOT_USER: pixelpocket-admin - MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD:?} - S3_BUCKET: pixelpocket - S3_ACCESS_KEY: pixelpocket-app - S3_SECRET_KEY: ${S3_SECRET_KEY:?} - depends_on: - minio: - condition: service_healthy - restart: "no" - exclude_from_hc: true - volumes: - - ./infra/minio:/scripts:ro - deploy: - resources: - limits: - cpus: "0.25" - memory: 128M - - backend: - image: ghcr.io/project-graphite/pixelpocket/backend:${IMAGE_TAG:-latest} - environment: - NODE_ENV: production - PORT: "5000" - DATABASE_LOCAL: mongodb://pixelpocket:${MONGO_PASSWORD:?}@mongo:27017/pixelpocket?authSource=admin - JWT_SECRET: ${JWT_SECRET:?} - JWT_EXPIRES_IN: ${JWT_EXPIRES_IN:-90d} - JWT_COOKIE_EXPIRES_IN: ${JWT_COOKIE_EXPIRES_IN:-90} - FRONTEND_URL: https://pixelpocket.project-graphite.com - EMAIL_HOST: ${EMAIL_HOST:?} - EMAIL_PORT: ${EMAIL_PORT:-587} - EMAIL_USERNAME: ${EMAIL_USERNAME:-} - EMAIL_PASSWORD: ${EMAIL_PASSWORD:-} - EMAIL_FROM: ${EMAIL_FROM:?} - S3_ENDPOINT: http://minio:9000 - S3_BUCKET: pixelpocket - S3_ACCESS_KEY: pixelpocket-app - S3_SECRET_KEY: ${S3_SECRET_KEY:?} - depends_on: - mongo: - condition: service_healthy - minio-init: - condition: service_completed_successfully - expose: - - "5000" - healthcheck: - test: [CMD, wget, --quiet, --tries=1, --spider, http://127.0.0.1:5000/api/v1/users/session] - interval: 30s - timeout: 5s - start_period: 20s - retries: 3 - init: true - restart: unless-stopped - security_opt: - - no-new-privileges:true - deploy: - resources: - limits: - cpus: "0.50" - memory: 256M - - frontend: - image: ghcr.io/project-graphite/pixelpocket/frontend:${IMAGE_TAG:-latest} - depends_on: - backend: - condition: service_healthy - expose: - - "80" - healthcheck: - test: [CMD, wget, --quiet, --tries=1, --spider, http://127.0.0.1/] - interval: 30s - timeout: 5s - start_period: 10s - retries: 3 - init: true - restart: unless-stopped - security_opt: - - no-new-privileges:true - deploy: - resources: - limits: - cpus: "0.25" - memory: 64M - -volumes: - mongo-data: - minio-data: