Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy Tailbliss on Coolify #221

Open
SamKr opened this issue Oct 2, 2024 · 3 comments
Open

Deploy Tailbliss on Coolify #221

SamKr opened this issue Oct 2, 2024 · 3 comments

Comments

@SamKr
Copy link

SamKr commented Oct 2, 2024

Hi @nusserstudios,

I noticed in issue #201 that you've deployed tailbliss to Coolify. I've setup my own Coolify instance, and trying to do the same, but I'm unable to get it to build.

At first it said that Hugo was missing. I found this post:

https://beefb.one/posts/091824/

After adding the nixpacks.toml file and setting it as a static site I got this error:

#13 [stage-0  9/11] RUN --mount=type=cache,id=jgcwo88cwk0kwssogk0s8oog-node_modules/cache,target=/app/node_modules/.cache hugo --minify
#13 0.165 Error: Unable to locate config file or config directory. Perhaps you need to create a new site.
#13 0.165        Run `hugo help new` for details.
#13 0.165 
#13 0.165 Total in 1 ms
#13 ERROR: process "/bin/bash -ol pipefail -c hugo --minify" did not complete successfully: exit code: 255
------
 > [stage-0  9/11] RUN --mount=type=cache,id=jgcwo88cwk0kwssogk0s8oog-node_modules/cache,target=/app/node_modules/.cache hugo --minify:
0.165 Error: Unable to locate config file or config directory. Perhaps you need to create a new site.
0.165        Run `hugo help new` for details.
0.165 
0.165 Total in 1 ms

The post mentions the following, which seems relevant:

Also this setup assumes that hugo’s config file is named config.toml and is located at the root of your repo.

However that's not present in tailbliss. What configuration did you use to get Coolify to build and host tailbliss?

I'm using GitHub Actions on a clone of your main branch, and:

  • Build Pack: Nixpacks
  • Static Image: nginx:alpine
  • Base Directory: /
  • Publish Directory: /public
  • Is it a static site?: checked

Thanks for your help!

@nusserstudios
Copy link
Owner

nusserstudios commented Oct 2, 2024

Let me check it out this weekend Sam. I'll get a step by step guide on how I did it for you. It may have been a CloudPanel instance too, sorry.

@SamKr
Copy link
Author

SamKr commented Oct 2, 2024

Awesome, thanks either way 😄

@SamKr
Copy link
Author

SamKr commented Oct 3, 2024

Had some time to kill last night so spent it tinkering with Coolify, and finally got it to work. The post I linked was a good starting point but had to be tweaked a bit for Tailbliss.

Hadn't heard of Coolify before I saw you mention it, very happy with this so thanks for that :) Hopefully you can take a peak at discussion #185 when you have some spare time this weekend (or later on, no hurry ofc)?

Rough manual:

  • In Coolify, configure a Project that uses a GitHub App as its source (any Git source should work)
  • Your Tailbliss site (the source, not compiled) should be in the root of the repo
  • Make sure you keep the .gitignore file in tact
  • Add a file named nixpacks.toml to the repo's root with the following content:
[phases.setup]
aptPkgs = ["hugo"]

[ environment ]
HUGO_VERSION = "0.112.3"

[[ nixpacks.included_files ]]
paths = ["/public"]

[ note: not sure about the Hugo version, whether that's relevant ]

  • Add an empty file named Staticfile to the repo's root
  • Open hugo.yaml and edit the following line (the default is true, but this causes the build to fail):
enableGitInfo: false
  • Open package.json and edit the following line (the default doesn't contain the --config parameter):
"build": "hugo --config hugo.yaml --minify",
  • Go to the project in Coolify
  • Set Build Pack to Nixpacks
  • Set Static Image to nginx:alpine
  • Set Publish Directory to /public
  • Set Is it a static site? to checked

Click (re)deploy and hope for the best! I should note that I tinkered quite a bit with my Coolify instance, so I'm not 100% sure whether this is the full list (or if something can be skipped).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants