From 292aa59a0e85e9e18d5e5042b9d0cf0c6f94fe18 Mon Sep 17 00:00:00 2001 From: Sara Zanellato Date: Mon, 8 Jul 2024 16:54:08 +0200 Subject: [PATCH] chore: rename docker compose files --- README.OGCIO.md | 4 +-- docker-compose-local.yml | 18 +++++++++- docker-compose-ogcio-logto.yml | 61 ---------------------------------- makefile | 2 +- 4 files changed, 20 insertions(+), 65 deletions(-) delete mode 100644 docker-compose-ogcio-logto.yml diff --git a/README.OGCIO.md b/README.OGCIO.md index f4828aeb51bc..9b8e266a4fee 100644 --- a/README.OGCIO.md +++ b/README.OGCIO.md @@ -38,11 +38,11 @@ You can also run Logto natively on your machine outside the docker container. If you start Logto natively, the database won't be available, and you will have to start it separately. The database is still dockerized and has its own Docker Compose configuration. Use the following command to start the database container: -`docker compose -f docker-compose-ogcio-logto.yml up -d postgres` +`docker compose -f docker-compose-local.yml up -d postgres` With the following command, you can shut down the database container: -`docker compose -f docker-compose-ogcio-logto.yml down postgres` +`docker compose -f docker-compose-local.yml down postgres` ### Configuration and installation diff --git a/docker-compose-local.yml b/docker-compose-local.yml index a9d5657ad8fe..0fb71523cb8d 100644 --- a/docker-compose-local.yml +++ b/docker-compose-local.yml @@ -4,7 +4,9 @@ services: depends_on: postgres: condition: service_healthy - image: local-logto:latest + mygovid-mock-service: + condition: service_started + image: 730335224023.dkr.ecr.eu-west-1.amazonaws.com/life-events-logto:dev entrypoint: [ "sh", @@ -23,6 +25,9 @@ services: - ADMIN_ENDPOINT - PORT=3301 - ADMIN_PORT=3302 + - MOCK_TOKEN_ENDPOINT=http://mygovid-mock-service:4005/logto/mock/token + - MOCK_KEYS_ENDPOINT=http://mygovid-mock-service:4005/logto/mock/keys + postgres: image: postgres:14-alpine user: postgres @@ -40,6 +45,17 @@ services: ports: - 5433:5433 + mygovid-mock-service: + image: mygovid-mock-service:latest + build: + dockerfile: ./mygovid-mock-service/Dockerfile + ports: + - 4005:4005 + volumes: db: driver: local + +networks: + logto_network: + external: true diff --git a/docker-compose-ogcio-logto.yml b/docker-compose-ogcio-logto.yml deleted file mode 100644 index 0fb71523cb8d..000000000000 --- a/docker-compose-ogcio-logto.yml +++ /dev/null @@ -1,61 +0,0 @@ -# This file has been added on OGCIO fork -services: - app: - depends_on: - postgres: - condition: service_healthy - mygovid-mock-service: - condition: service_started - image: 730335224023.dkr.ecr.eu-west-1.amazonaws.com/life-events-logto:dev - entrypoint: - [ - "sh", - "-c", - "npm run cli db seed -- --swe && npm run cli db alteration deploy latest && npm run cli db ogcio -- --seeder-filepath=\"/etc/logto/packages/cli/src/commands/database/ogcio/ogcio-seeder-local.json\" && npm start" - ] - ports: - - 3301:3301 - - 3302:3302 - environment: - - TRUST_PROXY_HEADER=1 - - DB_URL=postgres://postgres:p0stgr3s@postgres:5433/logto - # Mandatory for GitPod to map host env to the container, thus GitPod can dynamically configure the public URL of Logto; - # Or, you can leverage it for local testing. - - ENDPOINT - - ADMIN_ENDPOINT - - PORT=3301 - - ADMIN_PORT=3302 - - MOCK_TOKEN_ENDPOINT=http://mygovid-mock-service:4005/logto/mock/token - - MOCK_KEYS_ENDPOINT=http://mygovid-mock-service:4005/logto/mock/keys - - postgres: - image: postgres:14-alpine - user: postgres - volumes: - - db:/var/lib/postgresql/data - environment: - POSTGRES_USER: postgres - POSTGRES_PASSWORD: p0stgr3s - PGPORT: 5433 - healthcheck: - test: [ "CMD-SHELL", "pg_isready" ] - interval: 10s - timeout: 5s - retries: 5 - ports: - - 5433:5433 - - mygovid-mock-service: - image: mygovid-mock-service:latest - build: - dockerfile: ./mygovid-mock-service/Dockerfile - ports: - - 4005:4005 - -volumes: - db: - driver: local - -networks: - logto_network: - external: true diff --git a/makefile b/makefile index 6616449cdbea..49ddf394a5f0 100644 --- a/makefile +++ b/makefile @@ -11,7 +11,7 @@ down: docker-compose -f docker-compose-local.yml down run-native: @echo "${GREEN}Starting db...${NC}" - docker compose -f docker-compose-ogcio-logto.yml up --detach postgres + docker compose -f docker-compose-local.yml up --detach postgres @echo "${GREEN}Db started!${NC}" @echo "${GREEN}Installing stuffs...${NC}" pnpm pnpm:devPreinstall && pnpm i && pnpm prepack