Skip to content

Commit

Permalink
Merge pull request #44 from ItzNotABug/update-readme-for-docker-testing
Browse files Browse the repository at this point in the history
Update: `README.md`.
  • Loading branch information
ItzNotABug authored Mar 28, 2024
2 parents cbd4abc + dfe37c0 commit 3ae426c
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,30 @@ You can use below for combining the above commands -
npm run cleanstart
```

##### Building the Docker Image -

```bash
docker build -t ghosler . --no-cache
```

After a successful local build, run the container -

```bash
docker run --rm name ghosler -d -p 2369:2369 -v ghosler-logs:/usr/src/app/.logs -v ghosler-analytics:/usr/src/app/files -v ghosler-configuration:/usr/src/app/configuration ghosler
```

**Note**: For testing the Docker container over a publicly accessible URL, I used `Cloudflare Tunnel` as it doesn't have
a startup page like `ngrok` or the `VSCode`'s dev tunnel and works good for testing the Ghost Webhooks.

Assuming you have `TryCloudflare CLI` installed, you can do something like this -

```bash
cloudflared tunnel --url http://localhost:2369
```

This command will initialize a tunnel and return a URL that you can use to test.\
For more info, see - [TryCloudflare Tunnel](https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/do-more-with-tunnels/trycloudflare/).

### Custom Template

If you want to customize the newsletter template even more, follow the steps -
Expand Down

0 comments on commit 3ae426c

Please sign in to comment.