Skip to content

Commit

Permalink
setup nginx for the new website
Browse files Browse the repository at this point in the history
Signed-off-by: Augustin Husson <[email protected]>
  • Loading branch information
Nexucis committed Nov 5, 2024
1 parent 0550eb4 commit 1b589ca
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
20 changes: 18 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,30 @@ python3 -m venv venv
source ./venv/bin/activate # Scripts instead of bin on windows
```

Then you can install de libs required to run the Perses website:
Then you can install the libs required to run the Perses website:

```bash
pip install -r requirements.txt
```

And finally you can run the server:
And finally, you can run the server:

```bash
mkdocs serve -a "localhost:8080"
```

### Deploy the website

To build the website, run:

```bash
mkdocs build
```

Then you can run:

```bash
docker-compose up -d website
```

Then website is available at the url http://localhost:1313
7 changes: 3 additions & 4 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@ version: "3.9"

services:
website:
image: hugomods/hugo
command: hugo server --watch --bind=0.0.0.0 --disableLiveReload=true --minify -environment production --baseURL https://perses.dev --appendPort=false
image: nginx
restart: unless-stopped
ports:
- "1313:1313"
- "1313:80"
volumes:
- ./website:/src
- ./site:/usr/share/nginx/html:ro
labels:
- "traefik.enable=true"
# The domain the service will respond to
Expand Down

0 comments on commit 1b589ca

Please sign in to comment.