Skip to content

Commit

Permalink
Add docker integration
Browse files Browse the repository at this point in the history
  • Loading branch information
M0rgan01 committed Nov 26, 2024
1 parent 6c57ffd commit 88ac1dd
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 2 deletions.
9 changes: 9 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
services:
hugo:
image: klakegg/hugo:0.101.0-ext-debian
volumes:
- ./:/site
working_dir: /site
ports:
- ${HUGO_SERVER_PORT:-1313}:${HUGO_SERVER_PORT:-1313}
command: server --bind 0.0.0.0 --port ${HUGO_SERVER_PORT:-1313}
31 changes: 29 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Hello,
# PrestaShop Open Source

[![Build](https://github.com/PrestaShop/open-source/actions/workflows/build.yml/badge.svg)](https://github.com/PrestaShop/open-source/actions/workflows/build.yml)

Expand All @@ -8,7 +8,9 @@ It contains:
- source code and content for www.prestashop-project.org
- materials about the open source project evolution

# Rendering the site locally
## Rendering the site locally

### Option 1: Using Hugo installed on your system

1. Clone the repository somewhere on your system:
```
Expand All @@ -32,3 +34,28 @@ It contains:
```
hugo server
```
### Option 2: Using Docker (no need to install Hugo locally)
If you do not want to install Hugo on your system, you can use the provided `docker-compose.yml` file to run the site in a container.
1. Clone the repository (with submodules):
```bash
git clone --recurse-submodules https://github.com/PrestaShop/open-source.git
```
2. Switch to the `open-source` directory:
```bash
cd open-source
```
3. Use the following command to start the Hugo server:
```bash
docker-compose up
```
By default, the server will run on port `1313`. You can specify a different port by setting the `HUGO_SERVER_PORT` environment variable before running the command. For example:
```bash
HUGO_SERVER_PORT=3000 docker-compose up
```
4. Access the site in your browser at `http://localhost:<PORT>`, replacing `<PORT>` with the port you defined (default is `1313`).

0 comments on commit 88ac1dd

Please sign in to comment.