Skip to content

Commit

Permalink
cross fingers
Browse files Browse the repository at this point in the history
  • Loading branch information
acharb committed Nov 22, 2023
1 parent 255513d commit 81c4ffa
Show file tree
Hide file tree
Showing 3 changed files with 97 additions and 62 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/integrationTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
- run: yarn install
- run: yarn build
- run: yarn test:integration
# ALEC TODO - remove below probably
- name: Print Docker Logs
if: always() # This ensures that the logs are printed even if the tests fail
run: docker-compose logs
run: docker-compose logs all
86 changes: 62 additions & 24 deletions docker-compose-sandbox.yml
Original file line number Diff line number Diff line change
@@ -1,45 +1,33 @@
version: "3"
services:
postgres1:
image: postgres
environment:
POSTGRES_PASSWORD: pg_password1
POSTGRES_DB: pg_database1
ports:
- "5432:5432"

postgres2:
image: postgres
environment:
POSTGRES_PASSWORD: pg_password2
POSTGRES_DB: pg_database2
ports:
- "5433:5432"

recovery-signer-migrate1:
image: stellar/recoverysigner
depends_on:
- postgres1
postgres1:
condition: service_healthy
restart: on-failure
command: ["db", "migrate", "up"]
environment:
DB_URL: "postgresql://postgres:pg_password1@postgres1:5432/pg_database1?sslmode=disable"
DB_URL: "postgresql://postgres:pg_password@postgres1:5432/pg_database1?sslmode=disable"

recovery-signer-migrate2:
image: stellar/recoverysigner
depends_on:
- postgres2
postgres2:
condition: service_healthy
restart: on-failure
command: ["db", "migrate", "up"]
environment:
DB_URL: "postgresql://postgres:pg_password2@postgres2:5432/pg_database2?sslmode=disable"
DB_URL: "postgresql://postgres:pg_password@postgres2:5432/pg_database2?sslmode=disable"

recovery-signer1:
image: stellar/recoverysigner
ports:
- "8000:8000"
depends_on:
- recovery-signer-migrate1
- postgres1
environment:
DB_URL: "postgresql://postgres:pg_password1@postgres1:5432/pg_database1?sslmode=disable"
DB_URL: "postgresql://postgres:pg_password@postgres1:5432/pg_database1?sslmode=disable"
SIGNING_KEY: SAQFNCKPZ3ON5TSSEURAF4NPTZONPA37JPHQNHSLSRUNFP43MMT5LNH6
FIREBASE_PROJECT_ID: "none"
SEP10_JWKS: '{"keys":[{"kty":"EC","crv":"P-256","alg":"ES256","x":"dzqvhrMYwbmv7kcZK6L1oOATMFXG9wLFlnKfHf3E7FM","y":"Vb_wmcX-Zq2Hg2LFoXCEVWMwdJ01q41pSnxC3psunUY"}]}'
Expand All @@ -50,10 +38,60 @@ services:
ports:
- "8002:8002"
depends_on:
- recovery-signer-migrate2
- postgres2
environment:
DB_URL: "postgresql://postgres:pg_password2@postgres2:5432/pg_database2?sslmode=disable"
DB_URL: "postgresql://postgres:pg_password@postgres2:5432/pg_database2?sslmode=disable"
SIGNING_KEY: SA3Y2KQCPN6RAKLUISMY252QABWPQ3A65FBMZO2JJFKJ7O7VJNQ2PRYH # Use a different key for the second recovery signer
FIREBASE_PROJECT_ID: "none"
SEP10_JWKS: '{"keys":[{"kty":"EC","crv":"P-256","alg":"ES256","x":"dzqvhrMYwbmv7kcZK6L1oOATMFXG9wLFlnKfHf3E7FM","y":"Vb_wmcX-Zq2Hg2LFoXCEVWMwdJ01q41pSnxC3psunUY"}]}'
PORT: 8002

web-auth1:
image: stellar/webauth
ports:
- "8001:8001"
environment:
SIGNING_KEY: SDYHSG4V2JP5H66N2CXBFCOBTAUFWXGJVPKWY6OXSIPMYW743N62QX6U
JWK: '{"kty":"EC","crv":"P-256","alg":"ES256","x":"dzqvhrMYwbmv7kcZK6L1oOATMFXG9wLFlnKfHf3E7FM","y":"Vb_wmcX-Zq2Hg2LFoXCEVWMwdJ01q41pSnxC3psunUY","d":"ivOMB4Wscz8ShvhwWDRyd-JJVfSMsjsz1oU3sNc-XJo"}'
DOMAIN: test-domain
AUTH_HOME_DOMAIN: test-domain
JWT_ISSUER: test
PORT: 8001

web-auth2:
image: stellar/webauth
ports:
- "8003:8003"
environment:
SIGNING_KEY: SCAS7BUKVDL44A2BAP23RVAM6XXHB24YRCANQGDTP24HP7T6LPUFIGGU # Use a different key for the second web auth server
JWK: '{"kty":"EC","crv":"P-256","alg":"ES256","x":"dzqvhrMYwbmv7kcZK6L1oOATMFXG9wLFlnKfHf3E7FM","y":"Vb_wmcX-Zq2Hg2LFoXCEVWMwdJ01q41pSnxC3psunUY","d":"ivOMB4Wscz8ShvhwWDRyd-JJVfSMsjsz1oU3sNc-XJo"}'
DOMAIN: test-domain
AUTH_HOME_DOMAIN: test-domain
JWT_ISSUER: test
PORT: 8003

postgres1:
image: postgres
environment:
POSTGRES_PASSWORD: pg_password
POSTGRES_DB: pg_database1
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5

postgres2:
image: postgres
environment:
POSTGRES_PASSWORD: pg_password
POSTGRES_DB: pg_database2
ports:
- "5433:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
70 changes: 33 additions & 37 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,22 @@
version: "3"
services:
postgres1:
image: postgres
environment:
POSTGRES_PASSWORD: pg_password
POSTGRES_DB: pg_database1
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5

postgres2:
image: postgres
environment:
POSTGRES_PASSWORD: pg_password
POSTGRES_DB: pg_database2
ports:
- "5433:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5

recovery-signer-migrate1:
image: stellar/recoverysigner
depends_on:
- postgres1
postgres1:
condition: service_healthy
restart: on-failure
command: ["db", "migrate", "up"]
# entrypoint: ["/bin/bash", "-c"]
# command: >
# while !</dev/tcp/postgres1/5432; do sleep 1; done; /app/recoverysigner db
# migrate up
environment:
DB_URL: "postgresql://postgres:pg_password@postgres1:5432/pg_database1?sslmode=disable"

recovery-signer-migrate2:
image: stellar/recoverysigner
depends_on:
- postgres2
# entrypoint: ["/bin/bash", "-c"]
# command: >
# while !</dev/tcp/postgres1/5432; do sleep 1; done; /app/recoverysigner db
# migrate up
postgres2:
condition: service_healthy
restart: on-failure
command: ["db", "migrate", "up"]
environment:
DB_URL: "postgresql://postgres:pg_password@postgres2:5432/pg_database2?sslmode=disable"

Expand All @@ -55,7 +26,6 @@ services:
- "8000:8000"
depends_on:
- postgres1
command: ["db", "migrate", "up"]
environment:
DB_URL: "postgresql://postgres:pg_password@postgres1:5432/pg_database1?sslmode=disable"
SIGNING_KEY: SAQFNCKPZ3ON5TSSEURAF4NPTZONPA37JPHQNHSLSRUNFP43MMT5LNH6
Expand Down Expand Up @@ -99,3 +69,29 @@ services:
AUTH_HOME_DOMAIN: test-domain
JWT_ISSUER: test
PORT: 8003

postgres1:
image: postgres
environment:
POSTGRES_PASSWORD: pg_password
POSTGRES_DB: pg_database1
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5

postgres2:
image: postgres
environment:
POSTGRES_PASSWORD: pg_password
POSTGRES_DB: pg_database2
ports:
- "5433:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5

0 comments on commit 81c4ffa

Please sign in to comment.