This file contains hidden or 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
name: ui | |
containers: | |
- image: registry.devshift.net/fabric8-ui/fabric8-ui:309eeb | |
env: | |
- name: FABRIC8_SSO_API_URL | |
value: "https://sso.prod-preview.openshift.io" | |
- name: FABRIC8_WIT_API_URL | |
value: "http://wit:8080" | |
- name: FABRIC8_AUTH_API_URL | |
value: "http://auth:8089" |
This file contains hidden or 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
apiVersion: apps/v1beta1 | |
kind: Deployment | |
metadata: | |
name: webapp | |
spec: | |
template: | |
metadata: | |
labels: | |
app: webapp | |
spec: |
This file contains hidden or 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
apiVersion: apps/v1beta1 | |
kind: Deployment | |
metadata: | |
name: postgres | |
spec: | |
template: | |
metadata: | |
labels: | |
app: postgres | |
spec: |
This file contains hidden or 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
apiVersion: v1 | |
kind: Secret | |
metadata: | |
name: database-secret-config | |
type: Opaque | |
data: | |
dbname: dXJsX3Nob3J0ZW5lcl9kYg== | |
username: dXNlcg== | |
password: bXlzZWNyZXRwYXNzd29yZA== |
This file contains hidden or 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
apiVersion: apps/v1beta1 | |
kind: Deployment | |
metadata: | |
name: webapp | |
spec: | |
... | |
env: | |
- name: POSTGRES_HOST | |
value: postgres | |
- name: POSTGRES_PORT |
This file contains hidden or 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
apiVersion: apps/v1beta1 | |
kind: Deployment | |
metadata: | |
name: postgres | |
spec: | |
... | |
env: | |
- name: POSTGRES_DB | |
value: url_shortener_db | |
- name: POSTGRES_USER |
This file contains hidden or 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
type Config struct { | |
Server struct { | |
Host string `json:"host"` | |
Port string `json:"port"` | |
} `json:"server"` | |
Postgres struct { | |
Host string `json:"host"` | |
User string `json:"user"` | |
Password string `json:"password"` | |
DB string `json:"db"` |
This file contains hidden or 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
tmpl := template.New("foo_bar").Parse( | |
`<div id="{{.ID}}"><p>{{.Content}}</p></div>`) | |
tmpl.Execute(w, struct { | |
ID string | |
Content string | |
}{ | |
ID: "foo", | |
Content: "bar", | |
}) |
This file contains hidden or 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
config := Config{ | |
Server: struct { | |
Host string `json:"host"` | |
Port string `json:"port"` | |
}{ | |
Host: "localhost", | |
Port: "8080", | |
}, | |
Postgres: struct { | |
Host string `json:"host"` |
This file contains hidden or 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
type Config struct { | |
Server Server `json:"server"` | |
Postgres Postgres `json:"postgres"` | |
} | |
type Server struct { | |
Host string `json:"host"` | |
Port string `json:"port"` | |
} |