This repository contains the resources for https://eirini.cf
.
- Navigate to the
db/
directory - Run
./helm-install-db.sh
- Export the
MYSQL_ROOT_PASSWORD
to an environment variable:export MYSQL_ROOT_PASSWORD=$(kubectl get secret --namespace pheed-db pheed-mysql -o jsonpath="{.data.mysql-root-password}" | base64 --decode; echo)
- Get the node port of the database and export it as
$DB_PORT
:export DB_PORT=$(kubectl get service -npheed-db pheed-mysql -ojsonpath='{.spec.ports[?(.name=="mysql")].nodePort}')
- Get a Node IP and export it as
$DB_IP
-
Navigate to the
api/
directory -
Run
cf push --no-start
-
Create the Custom Service for the Database
cf cups pheed-db -p "$(./db-cups.json.sh)"
-
Bind the service with the API CF app:
cf bind-service eirinidotcf-api pheed-db
-
Start the API:
cf start eirinidotcf-api
- Navigate to the
/web
directory - Set the
api_url
insrc/config.json
tohttp://eirinidotcf.<your-cf-domain>
- Build the static content using
yarn
:yarn install yarn run build
- CF push the web frontend with
$ cf push
The frontend app should be avialable now at http://web.<your-cf-domain>
If you have a domain registered to your cluster node IP and you want to use it for this app, run the following commands:
cf create-domain <org> <domain>
cf map-route web <domain>