Skip to content

Commit

Permalink
updating mariadb hostname env var values
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Clifford committed Mar 19, 2021
1 parent 34fdcba commit 1d35c1e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .lagoon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ project: "lagoon-sync"
lagoon-sync:
mariadb:
config:
hostname: "$MARIADB_HOST_LAGOON_SYNC"
hostname: "$MARIADB_HOST"
username: "$MARIADB_USERNAME"
password: "$MARIADB_PASSWORD"
port: "$MARIADB_PORT"
Expand Down Expand Up @@ -68,4 +68,4 @@ lagoon-sync:
# local:
# overrides:
# config:
# syncpath: "./config/sync"
# syncpath: "./config/sync"
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ To transfer between remote environments you can pass in a target argument such a

`lagoon-sync sync mariadb -p amazeelabsv4-com -e prod -t dev --dry-run`

This command would attempt to sync mariadb databases from `prod` to `dev` environments.
This command would attempt to sync mariadb databases from `prod` to `dev` environments.

## Configuring lagoon-sync

Expand All @@ -116,7 +116,7 @@ It is possible to configure the data consumed by lagoon-sync via adding `lagoon-
Config files that can be used in order of priority:
- .lagoon-sync-defaults _(no yaml ext neeeded)_
- .lagoon-sync _(no yaml ext neeeded)_
- .lagoon.yml _Main config file - path can be given as an argument with `--config`, default is `.lagoon.yml`_
- .lagoon.yml _Main config file - path can be given as an argument with `--config`, default is `.lagoon.yml`_

If either `LAGOON_SYNC_PATH` or `LAGOON_SYNC_DEFAULTS_PATH` env vars are set then it will use those paths instead of the main config file - e.g.

Expand All @@ -137,7 +137,7 @@ lagoon-sync:
database: "$POSTGRES_DATABASE"
mariadb:
config:
hostname: "$MARIADB_HOSTNAME"
hostname: "$MARIADB_HOST"
username: "$MARIADB_USERNAME"
password: "$MARIADB_PASSWORD"
port: "$MARIADB_PORT"
Expand Down Expand Up @@ -186,4 +186,4 @@ Setting up locally:

We are using goreleaser for the official build, release and publish steps that will be ran from a github action on a pushed tag.

Locally, we can run `make release-test` to check if our changes will build. If compiling was successful we can commit our changes and then run `make release-[patch|minor|major]` to tag with next release number and it will push up to GitHub. A GitHub action will then be triggered which will publish the official release using goreleaser.
Locally, we can run `make release-test` to check if our changes will build. If compiling was successful we can commit our changes and then run `make release-[patch|minor|major]` to tag with next release number and it will push up to GitHub. A GitHub action will then be triggered which will publish the official release using goreleaser.
2 changes: 1 addition & 1 deletion prerequisite/envVarPrerequisite.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ func (e *EnvVarRsyncPrerequisite) Status() int {
func getMariaDbEnvVars() DbEnvVars {
var hostname, mariadbHostExists = os.LookupEnv("MARIADB_HOSTNAME")
if !mariadbHostExists {
hostname, mariadbHostExists = os.LookupEnv("AMAZEEIO_DB_HOST")
hostname, mariadbHostExists = os.LookupEnv("MARIADB_HOST")
}
var username = os.Getenv("MARIADB_USERNAME")
var password = os.Getenv("MARIADB_PASSWORD")
Expand Down

0 comments on commit 1d35c1e

Please sign in to comment.