-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add docker-staging.yml for deploymen to staging
SAML fixes based on testing with staging Use HOSTNAME=http://host.docker.internal:8080 so tests work
- Loading branch information
Showing
4 changed files
with
86 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,8 +26,7 @@ NOTIFICATIONS_EMAIL_USER="[email protected]" | |
SMTP_PORT=1025 | ||
|
||
# SSO Config | ||
HOSTNAME=http://localhost:8080 | ||
# NOTE: we don't use localhost here due to DNS issues between Docker and host | ||
HOSTNAME=http://host.docker.internal:8080 | ||
# The SimpleSAML IDP's XML metadata | ||
SAML_IDP_METADATA_PATH=config/idp-metadata-dev.xml | ||
# Our apps's SP Entity ID, which is also the URL to our metadata. | ||
SAML_ENTITY_ID=http://host.docker.internal:8080/sp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# Stack Definition for Staging | ||
services: | ||
# Redis is used to back our worker queues. It is not exposed. | ||
redis: | ||
image: redis:7.0.9-alpine3.17@sha256:8201775852e31262823ac8da9d76d0c8f36583f1a028b4800c35fc319c75289f | ||
restart: unless-stopped | ||
volumes: | ||
- redis-data:/data | ||
deploy: | ||
placement: | ||
# We run the redis instance on the manager node only | ||
constraints: [node.role == manager] | ||
|
||
mycustomdomain-dev: | ||
# Staging runs the most recent commit on the main branch | ||
image: ghcr.io/developingspace/starchart:main | ||
restart: unless-stopped | ||
depends_on: | ||
- redis | ||
ports: | ||
- 8080:8080 | ||
environment: | ||
- HOSTNAME=https://mycustomdomain-dev.senecacollege.ca | ||
- AWS_ROUTE53_HOSTED_ZONE_ID=Z0228625ICAL609E0BBT | ||
- [email protected] | ||
- LETS_ENCRYPT_DIRECTORY_URL=https://acme-staging-v02.api.letsencrypt.org/directory | ||
- LOG_LEVEL=info | ||
- NODE_ENV=production | ||
- [email protected] | ||
- PORT=8080 | ||
- REDIS_URL=redis://redis:6379 | ||
- ROOT_DOMAIN=_stage_.mystudentproject.ca | ||
secrets: | ||
- AWS_ACCESS_KEY_ID | ||
- AWS_SECRET_ACCESS_KEY | ||
- DATABASE_URL | ||
- LETS_ENCRYPT_ACCOUNT_PRIVATE_KEY_PEM | ||
- NOTIFICATIONS_USERNAME | ||
- NOTIFICATIONS_PASSWORD | ||
- SESSION_SECRET | ||
deploy: | ||
mode: replicated | ||
replicas: 2 | ||
update_config: | ||
# Only update 1 instance at a time, not all at once (rolling-update) | ||
parallelism: 1 | ||
# If the update fails, rollback to last-known-good | ||
failure_action: rollback | ||
|
||
secrets: | ||
AWS_ACCESS_KEY_ID: | ||
external: true | ||
AWS_SECRET_ACCESS_KEY: | ||
external: true | ||
DATABASE_URL: | ||
external: true | ||
LETS_ENCRYPT_ACCOUNT_PRIVATE_KEY_PEM: | ||
external: true | ||
NOTIFICATIONS_USERNAME: | ||
external: true | ||
NOTIFICATIONS_PASSWORD: | ||
external: true | ||
SESSION_SECRET: | ||
external: true | ||
|
||
volumes: | ||
redis-data: |