feat: add strapi template
This commit is contained in:
53
templates/compose/strapi.yaml
Normal file
53
templates/compose/strapi.yaml
Normal file
@@ -0,0 +1,53 @@
|
||||
# documentation: https://docs.strapi.io/
|
||||
# slogan: Open-source headless CMS to build powerful APIs with built-in content management.
|
||||
# tags: cms, headless, mysql, api
|
||||
# logo: svgs/strapi.svg
|
||||
# port: 1337
|
||||
|
||||
services:
|
||||
strapi:
|
||||
image: "elestio/strapi-development:latest"
|
||||
environment:
|
||||
- SERVICE_FQDN_STRAPI_1337
|
||||
- DATABASE_CLIENT=postgres
|
||||
- DATABASE_HOST=postgresql
|
||||
- DATABASE_PORT=5432
|
||||
- "DATABASE_NAME=${POSTGRESQL_DATABASE:-strapi}"
|
||||
- DATABASE_USERNAME=$SERVICE_USER_POSTGRESQL
|
||||
- DATABASE_PASSWORD=$SERVICE_PASSWORD_POSTGRESQL
|
||||
- JWT_SECRET=$SERVICE_BASE64_64_SECRET
|
||||
- ADMIN_JWT_SECRET=$SERVICE_BASE64_64_SECRET
|
||||
- APP_KEYS=$SERVICE_BASE64_64_KEY
|
||||
volumes:
|
||||
- "strapi-config:/opt/app/config"
|
||||
- "strapi-src:/opt/app/src"
|
||||
- "strapi-uploads:/opt/app/public/uploads"
|
||||
healthcheck:
|
||||
test:
|
||||
- CMD
|
||||
- wget
|
||||
- "-q"
|
||||
- "--spider"
|
||||
- "http://127.0.0.1:1337/"
|
||||
interval: 5s
|
||||
timeout: 20s
|
||||
retries: 10
|
||||
depends_on:
|
||||
postgresql:
|
||||
condition: service_healthy
|
||||
postgresql:
|
||||
image: "elestio/postgres:latest"
|
||||
environment:
|
||||
- "POSTGRES_DB=${POSTGRESQL_DATABASE:-strapi}"
|
||||
- POSTGRES_USER=$SERVICE_USER_POSTGRESQL
|
||||
- POSTGRES_PASSWORD=$SERVICE_PASSWORD_POSTGRESQL
|
||||
- PGDATA=/var/lib/postgresql/data
|
||||
volumes:
|
||||
- "strapi-postgresql-data:/var/lib/postgresql/data"
|
||||
healthcheck:
|
||||
test:
|
||||
- CMD-SHELL
|
||||
- "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"
|
||||
interval: 5s
|
||||
timeout: 20s
|
||||
retries: 10
|
||||
Reference in New Issue
Block a user