eiko web app
You need to have a services account to access the google Datastore
export ACCOUNT_NAME=
export PROJECT_ID=
export CREDENTIALS=CREDENTIALS.json
gcloud iam service-accounts create $ACCOUNT_NAME
gcloud projects add-iam-policy-binding $PROJECT_ID --member "serviceAccount:$ACCOUNT_NAME@$PROJECT_ID.iam.gserviceaccount.com" --role "roles/owner"
gcloud iam service-accounts keys create $CREDENTIALS --iam-account $ACCOUNT_NAME@$PROJECT_ID.iam.gserviceaccount.com
git clone https://github.com/eiko-team/eiko.git $GOPATH/src/github.com/eiko-team/eiko
cd $GOPATH/src/github.com/eiko-team/eiko
go get ./...
$EDITOR .env
make up
make cover
$BROWSER test.html
godoc -http ":8080"
$BROWSER http://127.0.0.1:8080/pkg/github.com/eiko-team/eiko/
docker run \
-p 8080:8080 \
-e SWAGGER_JSON=/foo/swagger.yml \
-v $HOME/go/src/github.com/eiko-team/eiko:/foo \
swaggerapi/swagger-ui
$BROWSER http://127.0.0.1:8080
.env file content:
PROJECT_ID=
CREDENTIALS=CREDENTIALS.json
SALT=
SEARCH_APP_ID=
SEARCH_API_KEY=
Where:
PROJECT_ID
: the GCP(Google Cloud Platform) Project idCREDENTIALS
: the GCP Credential fileSALT
: Salt to generate password hashSEARCH_APP_ID
: Algolia application IDSEARCH_API_KEY
: Algolia API Key
eiko:
image: eikoapp/eiko:latest-prod
restart: always
environment:
- 'PROJECT_ID=${PROJECT_ID}'
- 'SEARCH_API_KEY=${SEARCH_API_KEY}'
- 'SEARCH_APP_ID=${SEARCH_APP_ID}'
- 'PORT=80'
- 'STATIC_PWD=/srv'
- 'GOOGLE_APPLICATION_CREDENTIALS=/srv/${CREDENTIALS}'
- 'GRPC_GO_LOG_SEVERITY_LEVEL=INFO' # google datastore debug
- 'SALT=${SALT}
volumes:
- './CREDENTIALS.json:/srv/CREDENTIALS.json'
- '/etc/ssl/certs/ca-certificates.crt:/etc/ssl/certs/ca-certificates.crt'
make mini
eiko:
...
environment:
- 'FILE_TYPE=minimified'
- git (en, fr)
- go
- docker
- docker-compose