This file has been copied from WORDPRESS-TEMPLATE. Keep modifications minimal and improve the original instead. Project specific conventions are located in README.md.
Table of contents:
Install mandatory libraries on host:
npm install
Install additional libraries on host for autocompletion/linting on editor (optional):
npm run install-dev
Set up environment variables required by docker-compose.yaml:
. ./taito-config.sh
Setup secrets required by docker-compose.yaml:
See the secret file paths at the end of
docker-compose.yamland set the secret file contents accordingly. Usesecret1234as value for all 'randomly generated' secrets like database password. Ask other secret values from you colleagues or just retrieve them from dev environment withkubectl get secrets -o yaml --namespace full-stack-template-dev. You need to decode the base64 encoded values with thebase64command-line tool).
Start containers defined in docker-compose.yaml:
docker-compose up
Connect development database using password secret1234:
mysql -h localhost -P 7587 -D $db_database_name -u $db_database_mgr_username
Open the application on browser:
http://localhost:4635
Use npm, docker-compose and docker normally to run commands and operate containers.
If you would like to use some of the additional commands provided by Taito CLI also without using Taito CLI, first run the command with verbose option (taito -v) to see which commands Taito CLI executes under the hood, and then implement them in your package.json or Makefile.
Instructions defined in CONFIGURATION.md apply. You just need to run commands with npm or docker-compose directly instead of Taito CLI. If you want to setup the application environments or run CI/CD steps without Taito CLI, see the following instructions.
- Run taito-config.sh to set the environment variables for the environment in question (dev, test, stag, canary, or prod):
export taito_target_env=dev . taito-config.sh - Run terraform scripts that are located at
scripts/terraform/. Usescripts/terraform/common/backend.tfas backend, if you want to store terraform state on git. Note that the terraform scripts assume that a cloud provider project defined bytaito_resource_namespaceandtaito_resource_namespace_idalready exists and Terraform is allowed to create resources for that project. - (TODO: create database with terraform instead): Create a relational database (or databases) for an environment e.g. by using cloud provider web UI. See
db_*settings inscripts/taito/main.shfor database definitions. Create two user accounts for the database:FULL_STACK_TEMPLATE_ENVfor deploying the database migrations (broad user rights) andFULL_STACK_TEMPLATE_ENV_appfor the application (concise user rights). Configure also database extensions if required by the application (seedatabase/db.sql). - Set Kubernetes secret values with
kubectl. The secrets are defined bytaito_secretsinscripts/taito/project.sh, and they are referenced inscripts/helm*.yamlfiles.
You can easily implement CI/CD steps without Taito CLI. See continuous integration and delivery chapter of Taito CLI manual for instructions.