Skip to content

Commit

Permalink
compose e2e config
Browse files Browse the repository at this point in the history
  • Loading branch information
Joosakur committed Nov 28, 2023
1 parent 0649eb7 commit e30e2bd
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 5 deletions.
1 change: 1 addition & 0 deletions api-gateway/.dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
!src
!*.json
!*.lock
!config
2 changes: 1 addition & 1 deletion api-gateway/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ export const jwtPrivateKey = required(
ifNodeEnv(['local', 'test'], 'config/test-cert/jwt_private_key.pem')
)

export const appName = `oppivelvollisuus-api-gateway`
export const appName = 'oppivelvollisuus-api-gateway'
export const jwtKid = process.env.JWT_KID ?? appName

export const appBaseUrl = required(
Expand Down
29 changes: 25 additions & 4 deletions compose/docker-compose.e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,46 @@ services:
- "8765:80"
environment:
RESOLVER: "127.0.0.11 ipv6=off"
API_GATEWAY_URL: http://api-gateway:3000
API_GATEWAY_URL: http://api-gateway:8888
HTTP_SCHEME: http

service:
image: 095341522062.dkr.ecr.eu-north-1.amazonaws.com/oppivelvollisuus/service:${TAG:-master}
build:
context: ../service/
ports:
- "8080:8080"
- "9000:9000"
environment:
JAVA_OPTS: -server -Djava.security.egd=file:/dev/./urandom -Xms1024m -Xss512k -Xmx1024m -XX:TieredStopAtLevel=1
SERVER_PORT: 9000
SPRING_DATASOURCE_URL: jdbc:postgresql://oppivelvollisuus-db:5432/oppivelvollisuus
SPRING_DATASOURCE_USERNAME: oppivelvollisuus
SPRING_DATASOURCE_PASSWORD: postgres
APP_JWT_PUBLIC_KEYS_URL: classpath:local-development/jwks.json

api-gateway:
image: 095341522062.dkr.ecr.eu-north-1.amazonaws.com/oppivelvollisuus/api-gateway:${TAG:-master}
build:
context: ../api-gateway/
ports:
- "3000:3000"
- "8888:8888"
environment:
SERVICE_URL: http://service:8080
NODE_ENV: local
HTTP_PORT: 8888
SERVICE_URL: http://service:9000
JWT_KID: "oppivelvollisuus-api-gateway"
JWT_PRIVATE_KEY: "config/test-cert/jwt_private_key.pem"
AD_MOCK: "true"
DEV_LOGIN: "true"
AD_SAML_CALLBACK_URL: http://localhost:8765/api/auth/saml/login/callback
AD_SAML_ENTRYPOINT_URL: https://voltti-idp-azuread.staging.espoon-voltti.fi/idp/profile/SAML2/Redirect/SSO
AD_SAML_LOGOUT_URL: https://voltti-idp-azuread.staging.espoon-voltti.fi/idp/profile/SAML2/Redirect/SLO
AD_SAML_ISSUER: http://localhost:8765/api/auth/saml/
AD_SAML_PUBLIC_CERT: /app/config/certificates/idp.staging.espoon-voltti.fi.pem
AD_SAML_PRIVATE_CERT: /app/config/certificates/idp.test.espoon-voltti.fi.private
AD_SAML_EXTERNAL_ID_PREFIX: espoo-ad
AD_NAME_ID_FORMAT: "urn:oasis:names:tc:SAML:2.0:nameid-format:transient"
COOKIE_SECRET: cookie_secret
REDIS_HOST: redis
REDIS_PORT: 6379
REDIS_DISABLE_SECURITY: "true"

0 comments on commit e30e2bd

Please sign in to comment.