Commit 400e9094 authored by Marco Wettstein's avatar Marco Wettstein
Browse files

docs: format

parent aa023ef0
Pipeline #110505 passed with stage
in 2 minutes and 27 seconds
......@@ -49,17 +49,18 @@ variables:
```
To use a Cloud SQL Postgresql database:
1) set `cloudsql.enabled: true` in your `values.yml`.
1) create postgresql cloud sql instances for each environment
name: $CUSTOMER_NAME-$APP_NAME-[review|dev|prod|stage]
connectivity: public ip (no authorized networks needed)
1. set `cloudsql.enabled: true` in your `values.yml`.
1. create postgresql cloud sql instances for each environment
name: $CUSTOMER_NAME-$APP_NAME-[review|dev|prod|stage]
connectivity: public ip (no authorized networks needed)
note: pick the correct zone, machine type, backup location etc
warning: the name stays resevered even after the instance is deleted
use `cloudsql.instanceId` to override in case name is already taken
2) use `catladder project-config-secrets [review|dev|prod|stage]` to store
1. use `catladder project-config-secrets [review|dev|prod|stage]` to store
the postgresql password as POSTGRESQL_PASSWORD in `app-secrets`
## General Features
......@@ -217,7 +218,6 @@ variables:
MONGODB_ENABLED: "true" # whether to create a mongobd
WORKER_ENABLED: "false" # whether to launch an additional pod which has WORKER_ENABLED env var. usefull for cronjobs and migrations
MONGODB_REPLICAS: "3" # how many mongodb-replicas it will launch on production. other envs have always 1
```
This works similarly to `node-kubernetes`, but adds a meteor specific dockerfile
......@@ -227,12 +227,14 @@ This works similarly to `node-kubernetes`, but adds a meteor specific dockerfile
This uses [Cloud Native Buildpacks](https://buildpacks.io/) to build the container, similar to how Heroku builds a Rails app. No Dockerfile needed. It also disables the app-build job.
**Important**: the Rails app needs to be stateless. Most importantly it has to:
- Store uploads in Cloud Storage/S3 instead of local disk.
- Store shared state externally.
- Send email with Mailgun instead of the server's SMTP server.
When it would be able to run in Heroku then it will also work here.
When it would be able to run in Heroku then it will also work here.
Pipeline configuration:
```yaml
# .gitlab-ci.yml
include:
......@@ -246,6 +248,7 @@ variables:
```
Recommended [values](#values-handling):
```yaml
# values.yml
env:
......@@ -256,7 +259,7 @@ env:
POSTGRESQL_PASSWORD: app-secrets
application:
command: ['/cnb/process/web'] # buildpack entrypoint
command: ["/cnb/process/web"] # buildpack entrypoint
livenessProbe:
httpGet:
path: /robots.txt # change to your health route
......@@ -272,7 +275,7 @@ cloudsql:
jobs:
db-prepare:
hook: post-install,post-upgrade
command: '/cnb/lifecycle/launcher bundle exec rake db:prepare'
command: "/cnb/lifecycle/launcher bundle exec rake db:prepare"
```
```yaml
......@@ -280,10 +283,10 @@ jobs:
jobs:
db-prepare-seed:
hook: post-install
command: '/cnb/lifecycle/launcher bundle exec rake db:prepare db:seed'
command: "/cnb/lifecycle/launcher bundle exec rake db:prepare db:seed"
db-prepare:
hook: post-upgrade
command: '/cnb/lifecycle/launcher bundle exec rake db:prepare'
command: "/cnb/lifecycle/launcher bundle exec rake db:prepare"
```
Note: Cloud Native Buildpacks creates these default processes, which are available as `/cnb/process/<process-type>` inside the container:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment