@@ -15,13 +15,13 @@ have much experience with the tech stack that I've chosen here or even front-end
15
15
I hope this maybe, just maybe inspires someone else to just throw themselves into a project and have some fun along the
16
16
way : D
17
17
18
- Also, * technically * , this is a ** work-in-progress** but shh...
18
+ Also, _ technically _ , this is a ** work-in-progress** but shh...
19
19
20
20
## Dependencies
21
21
22
- - NodeJS 18
22
+ - NodeJS 20
23
23
- Yarn
24
- - ** (Optional)** Container Orchestration Tool (e.g Docker)
24
+ - ** (Optional)** Container Orchestration Tool (e.g. Docker)
25
25
26
26
If you're a ~~ filthy~~ [ Nix/NixOS] ( https://nixos.org/ ) user, you can take advantage of the [ flake.nix] ( flake.nix ) by
27
27
running ` nix develop ` to automatically get a shell with all the required dependencies.
@@ -44,27 +44,21 @@ running `nix develop` to automatically get a shell with all the required depende
44
44
provided [ Dockerfile] ( Dockerfile ) :
45
45
46
46
``` shell
47
- docker build -t website .
48
- docker run --rm -it -p 3000:3000 --name website website:latest
47
+ yarn docker:preview # or yarn docker:release
49
48
```
50
49
51
50
## Deployment
52
51
53
52
This is mostly for me when I revisit this godforsaken project in 7 months having forgotten everything : P
54
53
55
- This repository has a [ publish.yml] ( .github/workflows/publish.yml ) action which automatically builds
56
- the [ Dockerfile] ( Dockerfile ) and pushes
57
- to [ Docker Hub] ( https://hub.docker.com/repository/docker/sgoudham/website/general ) with the latest updates. This image
58
- is then automatically retrieved by [ Watchtower] ( https://containrrr.dev/watchtower/ ) on my server which automatically
59
- replaces the production docker container, therefore deploying the new updates to production. (In the future, I may
60
- switch this workflow to only use [ Portainer] ( https://www.portainer.io/ ) .)
54
+ This repository has 2 workflow files:
61
55
62
- ### Manual Commands
63
-
64
- ``` shell
65
- docker tag website:latest sgoudham/website:latest
66
- docker push sgoudham/website:latest
67
- ```
56
+ - ** [ preview.yml ] ( .github/workflows/preview.yml ) ** - This workflow is triggered on every pushed commit to the main branch.
57
+ - The website is built and deployed to docker hub as ` sgoudham/website:preview `
58
+ - My server automatically pulls the latest image from the ` preview ` tag and deploys it under ` https://preview.goudham.com ` .
59
+ - ** [ release.yml ] ( .github/workflows/release.yml ) ** - This workflow is triggered on any pushed tag.
60
+ - The website is built and deployed to docker hub as ` sgoudham/website:<tag> ` .
61
+ - My server automatically pulls the latest tag ` <tag> ` and deploys it under ` https://goudham.com ` .
68
62
69
63
## Contributing
70
64
0 commit comments