Skip to content

Commit

Permalink
feat: provide redis configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
MSzalowski committed Jul 1, 2024
1 parent f7c1902 commit c31cdc2
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build-and-deploy-beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ jobs:
TRAEFIK_LE_EMAIL: "[email protected]"
USERSNAP_SPACE_API_KEY: ${{ secrets.USERSNAP_SPACE_API_KEY }}
IS_PROPOSAL_DISCUSSION_FORUM_ENABLED: ${{ inputs.isProposalDiscussionForumEnabled == 'enabled' }}
REDIS_PASSWORD: ${{ secrets.REDIS_PASSWORD }}
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-and-deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ jobs:
TRAEFIK_LE_EMAIL: "[email protected]"
USERSNAP_SPACE_API_KEY: ${{ secrets.USERSNAP_SPACE_API_KEY }}
IS_PROPOSAL_DISCUSSION_FORUM_ENABLED: ${{ inputs.isProposalDiscussionForumEnabled == 'enabled' }}
REDIS_PASSWORD: ${{ secrets.REDIS_PASSWORD }}
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-and-deploy-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ jobs:
TRAEFIK_LE_EMAIL: "[email protected]"
USERSNAP_SPACE_API_KEY: ${{ secrets.USERSNAP_SPACE_API_KEY }}
IS_PROPOSAL_DISCUSSION_FORUM_ENABLED: ${{github.event_name == 'push' && 'false' || inputs.isProposalDiscussionForumEnabled == 'enabled'}}
REDIS_PASSWORD: ${{ secrets.REDIS_PASSWORD }}
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-and-deploy-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ jobs:
TRAEFIK_LE_EMAIL: "[email protected]"
USERSNAP_SPACE_API_KEY: ${{ secrets.USERSNAP_SPACE_API_KEY }}
IS_PROPOSAL_DISCUSSION_FORUM_ENABLED: ${{github.event_name == 'push' && 'false' || inputs.isProposalDiscussionForumEnabled == 'enabled'}}
REDIS_PASSWORD: ${{ secrets.REDIS_PASSWORD }}
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
1 change: 1 addition & 0 deletions scripts/govtool/config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ $(target_config_dir)/backend-config.json: $(config_dir)/templates/backend-config
-e "s|<DBSYNC_POSTGRES_PASSWORD>|$${DBSYNC_POSTGRES_PASSWORD}|" \
-e "s|<SENTRY_DSN>|$${SENTRY_DSN_BACKEND}|" \
-e "s|<SENTRY_ENV>|$(env)|" \
-e "s|<REDIS_PASSWORD>|$${REDIS_PASSWORD}|" \
$< > $@

$(target_config_dir)/%.yml: $(template_config_dir)/%.yml $(target_config_dir)/
Expand Down
7 changes: 5 additions & 2 deletions scripts/govtool/config/templates/backend-config.json.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
"metadatavalidationhost": "http://metadata-validation",
"metadatavalidationport": "3000",
"metadatavalidationmaxconcurrentrequests": 10,
"redishost": "localhost",
"redisport": 6379
"redisconfig" : {
"host" : "http://redis",
"port" : 8094,
"password": "<REDIS_PASSWORD>"
}
}
10 changes: 10 additions & 0 deletions scripts/govtool/config/templates/docker-compose.yml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,15 @@ services:
- "traefik.http.routers.to-analytics-dashboard.entrypoints=websecure"
- "traefik.http.routers.to-analytics-dashboard.tls.certresolver=myresolver"
- "traefik.http.services.analytics-dashboard.loadbalancer.server.port=3000"

redis:
image: docker.io/bitnami/redis:7.2
ports:
- '8094:8094'
environment:
- REDIS_PASSWORD=${REDIS_PASSWORD}
volumes:
- 'redis_data:/bitnami/redis/data'

backend:
image: <REPO_URL>/backend:${BACKEND_TAG}
Expand Down Expand Up @@ -302,3 +311,4 @@ volumes:
node-db:
node-ipc:
loki-data:
redis_data:

0 comments on commit c31cdc2

Please sign in to comment.