Strapi comes with a full featured Command Line Interface (CLI) which lets you scaffold and manage your project in seconds.
Start your Strapi application with autoReload enabled. Learn more
yarn dev
Start your Strapi application with autoReload disabled. Learn more
yarn start
Build your admin panel. Learn more
yarn build
Different containerized services to use in the development process like postgresql and pgadmn
# Create the data/postgresql folder
mkdir -p data/postgresql
# Add the UID 1001 (non-root user of postgresql) as the folder owner
chown -R 1001:1001 data/postgresql
This will startup a local postgresDB with a RDMS system (pgadmin).
# docker version < 20.10.x
docker-compose up -d
# docker version >= 20.10.x
docker compose up -d
๐ก If you have trouble with the creation of the containers use:
docker compose up -d --force-recreate
# docker version < 20.10.x
docker-compose down
# docker version >= 20.10.x
docker compose down
A postgresql databas management tool
- PostgreSQL:
- User: postgres
- Password: supersecret123
- Open pgadmin
- Login
- Email: [email protected]
- Password: zskarte
- Add Server (right click on Servers)
- Register -> Server
- Name: postgres-local
- Host: postgresql-zskarte
- Port: 5432
- Username: postgres
- Password: supersecret123
- Save-Password: yes
- Register -> Server
- Create database (right click on Servers -> Server -> Databases)
- Create -> Database
- Name: zskarte
- Create -> Database
# Execute inside pgadmin docker container
docker exec -it pgadmin sh
# Dump Actual connections into servers.json file to
/venv/bin/python setup.py --dump-servers servers.json --user [email protected]
The application needs some data in order to work propperly. Curently, there is no seeding mechanism for an example organization. Follow those steps to create one:
- Create an organization
- Content Manager -> Organisation -> Create new entry
- Create an user for the organization
- Content Manager -> User -> Create new entry
- Add role "Authenticated"
- Add organization (the one created in step 1)
- Content Manager -> User -> Create new entry
- Set permissions for "Authenticated" role
- Settings -> User & Permissions Plugin -> Roles -> Authenticated
- Give all rights on Organization
- Give all rights on Operation
- Settings -> User & Permissions Plugin -> Roles -> Authenticated
An .env file has to be located inside the root folder for the application to start. There is an example .env file in the repo called ".env.example". For local development only, you can use the example file (rename it to ".env").
Connect to the AKS cluster with the following commands
# Install azure cli on MAC
brew update && brew install azure-cli
az login
az aks get-credentials --subscription zskarte --resource-group zskare --name zskare-aks --admin
# Switch your kubeconfig context (install kubectx first)
kubectx zskarte-aks-admin
# Switch to Test namespace (kubens doesn't work)
kubectl config set-context --current --namespace zskarte-test
# Switch to Prod namespace (kubens doesn't work)
kubectl config set-context --current --namespace zskarte-prod
kubectl port-forward service/pgadmin 7050:80
# Fill env variables
export SUBSCRIPTION=66961ec5-0870-43fb-a5cc-35e73d6d49d2
export LOCATION=switzerlandnorth
export RESOURCE_GROUP=zskarte
export AKS_CLUSTER=zskarte-aks
export VM_SIZE=Standard_B2s
# Create SSH key pair to login to instance in the future filename: zskarte
ssh-keygen -t rsa -b 4096 -C "zskarte"
# Create resource group
az group create --name $RESOURCE_GROUP \
--subscription $SUBSCRIPTION \
--location $LOCATION
# Create a basic single-node AKS cluster
az aks create \
--subscription $SUBSCRIPTION \
--resource-group $RESOURCE_GROUP \
--name $AKS_CLUSTER \
--vm-set-type VirtualMachineScaleSets \
--node-count 1 \
--ssh-key-value zskarte.pub \
--load-balancer-sku basic \
--enable-cluster-autoscaler \
--min-count 1 \
--max-count 1 \
--node-vm-size $VM_SIZE \
--nodepool-name default \
--node-osdisk-size 32 \
--node-osdisk-type managed
# Get credentials of AKS cluster
az aks get-credentials \
--subscription $SUBSCRIPTION \
--resource-group $RESOURCE_GROUP \
--name $AKS_CLUSTER \
--admin
AKSResourceID=$(az aks show --subscription $SUBSCRIPTION --name $AKS_CLUSTER --resource-group $RESOURCE_GROUP --query id -o tsv)
az resource update --ids $AKSResourceID --subscription $SUBSCRIPTION --set sku.tier="Free"
helm repo add bitnami https://charts.bitnami.com/bitnami
helm upgrade --install nginx-ingress-controller bitnami/nginx-ingress-controller --create-namespace -n nginx-ingress-controller -f .azure/aks/nginx/values.yml
helm upgrade --install cert-manager bitnami/cert-manager --create-namespace -n cert-manager -f .azure/aks/cert-manager/values.yml
kubectl apply -f .azure/aks/cert-manager/letsencrpyt-staging.yml
kubectl apply -f .azure/aks/cert-manager/letsencrpyt-prod.yml