Skip to main content

Deploying Frontity on platform.sh (middleware?)

Comments

2 comments

  • Chad Carlson

    Hello @harvey-botero!

    The tabs in your .platform.app.yaml file look a bit off, but that may just be Discourse doing something funky.

    Other than that, Frontity looks like it defaults to port 3000, and that you need to override to use a different.

    All apps on Platform.sh can only run on port 8888, which is accessible in the $PORT environment variable. Try this .platform.app.yaml file and see if you’re still having problems.

    name: app
    
    type: 'nodejs:14'
    
    hooks:
        build: npx frontity build
    
    web:
        commands:
            start: FRONTITY_SERVE_PORT=$PORT npx frontity serve
    

    You’ll be able to see which port Frontity is trying to use in your app by either SSHing into the container and taking a look at /var/log/app.log or by running the CLI command platform logs app -p iin5x4pvtoxre -e master.

    You’ll notice I took a few keys out as well. Since you have a start.command, locations isn’t necessary. Also, you don’t need to define disk for this app. Only when you start setting aside mounts that need write access to the file system is that key required.

    Hope this helps!

    0
  • Harvey Botero

    Thank you very much … it works perfectly! :slightly_smiling_face:

    0

Please sign in to leave a comment.