-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jan Kuthan
committed
Dec 10, 2020
1 parent
60f3157
commit 3291317
Showing
14 changed files
with
133 additions
and
18 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
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 |
---|---|---|
|
@@ -75,8 +75,22 @@ Your images you can find on your github profile under "Packages" tab. | |
|CR_PAT| with token for image repository (from previous step) | | ||
|
||
## Init production | ||
### Set Kubernetes namespace | ||
All configs use namespace attribute. Namespace is generated from your github | ||
username/repo (repo must be cloned with git), for example: | ||
```sh | ||
Repo: [email protected]:kdosiodjinud/symfony-docker.git | ||
Generated namespace: kdosiodjinud-symfony-docker | ||
``` | ||
|
||
Becouse project is universal, you must init script for replace namespaces in your cloned version: | ||
```sh | ||
./cli init | ||
``` | ||
That`s all! :) | ||
|
||
### Services | ||
Look at the kubernetes/init/secrets.yaml file and config your settings for production. | ||
Look at the **kubernetes/init/secrets.yaml** file and config your settings for production. | ||
After check apply configure all files from folder init: | ||
|
||
```sh | ||
|
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,5 @@ | ||
GIT_REPO_NAME=$(cut -d ":" -f2 <<< $(git config --get remote.origin.url)) | ||
REPO_NAME=${GIT_REPO_NAME/.git/} | ||
APP_NAMESPACE=${REPO_NAME/\//-} | ||
|
||
find ./kubernetes/ -type f -exec sed -i '' -e "s/#{APP_NAMESPACE}#/$APP_NAMESPACE/g" {} \; |
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 |
---|---|---|
|
@@ -6,7 +6,7 @@ metadata: | |
name: letsencrypt-prod | ||
spec: | ||
acme: | ||
email: [email protected] | ||
email: REPLACE_WITH_@_YOUR_EMAIL.COM | ||
privateKeySecretRef: | ||
name: letsencrypt-prod | ||
server: https://acme-v02.api.letsencrypt.org/directory | ||
|
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
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: symfony-secrets | ||
namespace: symfony | ||
name: app-secrets | ||
namespace: #{APP_NAMESPACE}# | ||
data: | ||
EXAMPLE_VARIABLE_IN_BASE64: MjRlMTdjNDc0MzBiZDIwNDRhNjFjMTMxYzFjZjY5OTAK | ||
EXAMPLE_VARIABLE_IN_BASE64: EXAMPLEVALUE= | ||
stringData: | ||
DATABASE_URL: 'postgres://vxlsmawa:[email protected]:5432/vxlsmawa' | ||
APP_SECRET: '24e17c47430bd2044a61c131c1cf6990' | ||
DATABASE_URL: 'postgres://USERNAME:PASSWORD@HOSTNAME:PORT/DATABASE' | ||
APP_SECRET: '123456789_APP_SECRET_EXAMPLE' |
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