From a9d78342ec0f9059c9039d14b6d07f422e475a54 Mon Sep 17 00:00:00 2001 From: Vibhav Bobade Date: Thu, 1 Sep 2022 02:33:17 +0530 Subject: [PATCH] chore: integrate Uffizzi PR Environments --- docker-compose.uffizzi.yml | 44 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 docker-compose.uffizzi.yml diff --git a/docker-compose.uffizzi.yml b/docker-compose.uffizzi.yml new file mode 100644 index 000000000..11d8cf2e7 --- /dev/null +++ b/docker-compose.uffizzi.yml @@ -0,0 +1,44 @@ +# This compose file is for demonstration only, do not use in prod. +version: "3.9" + +x-uffizzi: + ingress: + service: app + port: 3001 + continuous_previews: + deploy_preview_when_pull_request_is_opened: true + delete_preview_when_pull_request_is_closed: true + share_to_github: true + +services: + app: + depends_on: + - "postgres" + build: + context: ./ + dockerfile: ./Dockerfile + ports: + - 3001:3001 + environment: + TRUST_PROXY_HEADER: 1 + DB_URL: postgres://postgres:p0stgr3s@localhost:5432/logto + deploy: + resources: + limits: + memory: 2000M + entrypoint: /bin/sh + command: + - "-c" + - "npm run cli db seed -- --swe && ENDPOINT=$$UFFIZZI_URL npm start" + + postgres: + image: postgres:14-alpine + user: postgres + environment: + POSTGRES_USER: "postgres" + POSTGRES_PASSWORD: "p0stgr3s" + deploy: + resources: + limits: + memory: 500M +