Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

fix(service): strapi doesn't start (#8084)

Cynthia Ebertb67c70be3b3b
diff --git a/templates/compose/strapi.yaml b/templates/compose/strapi.yaml
index 964f83c8b8..57f6b328a4 100644
--- a/templates/compose/strapi.yaml
+++ b/templates/compose/strapi.yaml
@@ -7,8 +7,29 @@
services:
strapi:
- image: "elestio/strapi-development:latest"
+ image: "elestio/strapi-production:v5.33.4"
+ entrypoint: /bin/sh
+ command:
+ - -c
+ - |
+ cat > /opt/app/src/admin/vite.config.js << 'EOFVITE'
+ const { mergeConfig } = require('vite');
+ module.exports = (config) => {
+ return mergeConfig(config, {
+ resolve: {
+ alias: {
+ '@': '/src',
+ },
+ },
+ server: {
+ allowedHosts: ['$SERVICE_FQDN_STRAPI']
+ }
+ });
+ };
+ EOFVITE
+ exec npm run develop
environment:
+ - SERVICE_FQDN_STRAPI
- SERVICE_URL_STRAPI_1337
- DATABASE_CLIENT=postgres
- DATABASE_HOST=postgresql