Skip to content
This repository has been archived by the owner on Feb 27, 2023. It is now read-only.

Latest commit

 

History

History
122 lines (107 loc) · 4.11 KB

README.md

File metadata and controls

122 lines (107 loc) · 4.11 KB

eiko

maintenance CircleCI Go Report Card Codacy Badge codecov Docker Pulls Docker Stars discord tipeee Godoc

eiko web app

Installation

Open in Cloud Shell

You need to have a services account to access the google Datastore

Services account

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

Compilation and local building

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

Display test coverage

make cover
$BROWSER test.html

Self hosted doc in html

For the Golang Documentation

godoc -http ":8080"
$BROWSER http://127.0.0.1:8080/pkg/github.com/eiko-team/eiko/

For the API Documentation

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

Docker compose

.env file content:

PROJECT_ID=
CREDENTIALS=CREDENTIALS.json
SALT=
SEARCH_APP_ID=
SEARCH_API_KEY=

Where:

  • PROJECT_ID: the GCP(Google Cloud Platform) Project id
  • CREDENTIALS: the GCP Credential file
  • SALT: Salt to generate password hash
  • SEARCH_APP_ID: Algolia application ID
  • SEARCH_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'

minimified version

Build

make mini

Use in docker compose

  eiko:
    ...
    environment:
      - 'FILE_TYPE=minimified'

Requirements

Build the local developement server

Build minimified version