-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1775c9e
commit 94dddca
Showing
6 changed files
with
87 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
## Description | ||
Static Site generated with Hugo and hosted on Digitalocean app platform. | ||
|
||
## Theme | ||
The website relies on the FeelIt theme which can be found [here](https://github.com/khusika/FeelIt). Many thanks to Khusika | ||
|
||
### Theme documentation | ||
[FeelIt Documentation](https://feelit.khusika.dev/categories/documentation/) | ||
|
||
## Testing | ||
|
||
### Development mode | ||
Note: Ensure you are using the extended version of Hugo with Sass/SCSS support, | ||
```bash | ||
hugo serve --disableFastRender --config hugo.toml | ||
``` | ||
### Build mode | ||
Use Docker to locally test website builds | ||
```bash | ||
hugo --config hugo.toml | ||
``` | ||
|
||
## Deploying the App to Digital Ocean | ||
```bash | ||
doctl app create --spec .do/app.yml | ||
|
||
doctl apps update <app_id> --spec .do/app.yml | ||
``` | ||
https://docs.digitalocean.com/products/app-platform/reference/buildpacks/hugo/ | ||
https://docs.digitalocean.com/products/app-platform/reference/app-spec/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Add so DigitalOcean can recognize it as a hugo project. | ||
# https://docs.digitalocean.com/products/app-platform/reference/buildpacks/hugo/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/bash | ||
set -ex | ||
|
||
if ! command -v docker &> /dev/null; then | ||
echo "Error: Docker unavailable." | ||
exit 1 | ||
fi | ||
|
||
if ! docker ps -q > /dev/null 2>&1; then | ||
echo "Error: Docker not running." | ||
exit 1 | ||
fi | ||
|
||
if ! command -v hugo &> /dev/null; then | ||
echo "Error: Hugo unavilable." | ||
exit 1 | ||
fi | ||
|
||
# Pull the latest nginx image | ||
docker pull nginx:latest | ||
|
||
# Build | ||
hugo --config hugo.toml | ||
|
||
# Run the container with desired options | ||
docker run --name website \ | ||
-d \ | ||
-p 8080:80 \ | ||
-v "$(pwd)/public:/usr/share/nginx/html:ro" \ | ||
nginx | ||
|
||
echo "Nginx container 'website' started!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters