Proxy to services based on Accept
header.
docker-compose up -d
version: '3' | |
services: | |
frontproxy: | |
image: traefik | |
command: --api --docker | |
ports: | |
- "80:80" | |
- "443:443" | |
volumes: |
Here's the canonical TOML example from the TOML README, and a YAML version of the same. Which looks nicer?
title = "TOML Example" |
// Say we need to display list of posts showing *only* their titles | |
// and name of the post author | |
// without graphql | |
const data = { | |
posts: null, | |
usersById: {}, | |
}; | |
get('/api/posts') |
node_modules/ | |
*.log |
package util | |
import ( | |
"net/http" | |
"github.com/casbin/casbin" | |
"github.com/qiangxue/golang-restful-starter-kit/app" | |
"github.com/go-ozzo/ozzo-routing" | |
) | |
// Authorizer is a middleware that controls the access to the HTTP service, it is based |
workspace: | |
base: /build | |
pipeline: | |
dbnode1: | |
detach: true | |
image: mysql/mysql-cluster:7.5 | |
commands: | |
- sleep 5 |
DUMP | |
// pod-name name of the postgres pod | |
// postgres-user database user that is able to access the database | |
// database-name name of the database | |
kubectl exec [pod-name] -- bash -c "pg_dump -U [postgres-user] [database-name]" > database.sql | |
RESTORE | |
// pod-name name of the postgres pod | |
// postgres-user database user that is able to access the database | |
// database-name name of the database |