-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use env vars to select between dev and prod #158
Conversation
99c2c37
to
05b3efe
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that the ./generate-config.py
command in the .github/workflow/deploy.yaml
needs to be updated.
Also, the default variables should be for local deployments (so localhost and not the prod) since we have an prod.env
file for the prod.
rsync.exclude
Outdated
@@ -6,3 +6,4 @@ ci_build_images | |||
docker-compose/logs | |||
docker-compose/mariadb | |||
master-private.cfg | |||
dockerfiles |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I may be wrong but this seems to be needed by one of the master (nonstandard or galera, not sure exactly which one).
@@ -344,7 +342,7 @@ c['multiMaster'] = True | |||
|
|||
c['mq'] = { # Need to enable multimaster aware mq. Wamp is the only option for now. | |||
'type' : 'wamp', | |||
'router_url': 'ws://crossbar:8085/ws', | |||
'router_url': os.getenv('MQ_ROUTER_URL', default='ws://localhost:8085/ws'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the default should be crossbar:8085
(since this is what we will use in the future).
docker-compose/docker-compose.yaml
Outdated
- TITLE=MariaDB CI | ||
- TITLE_URL=https://github.com/MariaDB/server | ||
- BUILDMASTER_URL=https://buildbot.dev.mariadb.org/ | ||
- MQ_ROUTER_URL=ws://crossbar:8085/ws |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems wrong to me, you should rely on the env file and just define which environment variable are exposed in the container:
environment:
- TITLE
- TITLE_URL
- BUILDMASTER_URL
- MQ_ROUTER_URL
And then the stack is started with either:
docker-compose --env-file dev.env up -d
or
docker-compose --env-file prod.env up -d
See: https://gitlab.com/mariadb/downloads-mariadb-python3/-/blob/master/.gitlab-ci/deploy-dev.yml and https://gitlab.com/mariadb/downloads-mariadb-python3/-/tree/master/docker?ref_type=heads for examples.
3fd6853
to
e697647
Compare
LGTM feel free to merge. |
1606617
to
f263613
Compare
No description provided.