libreschool.org/README.md

81 lines
1.6 KiB
Markdown
Raw Normal View History

2023-11-28 21:43:12 +00:00
# libreschool.org
2023-11-28 22:21:30 +00:00
Libreschool website
2023-11-29 19:17:04 +00:00
## Development instructions
2023-11-28 22:21:30 +00:00
Clone repo with the command:
2023-11-29 19:17:04 +00:00
```sh
git clone --recurse-submodules ssh://git@git.libreschool.org:1022/LibreSchool/libreschool.org.git
cd libreschool.org
```
If you did clone this repo in the usual way, you probably missed the theme's git submodule. To download the missing submodule:
```sh
cd libreschool.org
2023-12-12 20:59:58 +00:00
git submodule update --init --recursive
2023-11-29 19:17:04 +00:00
```
Then start the hugo live server:
```sh
hugo serve
```
2024-02-27 22:30:45 +00:00
or
```sh
docker run --rm -d --name hugo_ls -v "$PWD:/src" -p "1313:1313" git.libreschool.org/bglug/hugo-extended:latest serve -s /src --gc --minify --bind 0.0.0.0
```
2023-11-29 19:17:04 +00:00
You can produce the complete website with:
```sh
hugo
```
The complete website will be placed in the `public` directory.
2023-12-01 21:25:37 +00:00
## Building the container image
This website can be used as a container image; to do so in docker:
```sh
docker build -t libreschool-website .
```
Then you can run the image:
```sh
docker run -d -p 6080:80 libreschool-website
```
With the above command, the website will be reachable via HTTP to port 6080.
It's also possible do bind mount the container's `/logs` directory, to expose nginx logs.
2023-12-02 21:57:35 +00:00
## Using the container image
### Plain docker invocation
```sh
2023-12-12 21:44:59 +00:00
docker run -d --name libreschool_website -p 6080:80 git.libreschool.org/libreschool/libreschool.org:latest
2023-12-02 21:57:35 +00:00
```
### Via docker compose
```yaml
version: "3.9"
services:
web:
image: git.libreschool.org/libreschool/libreschool.org:latest
restart: always
container_name: libreschool_website
volumes:
- ./logs:/logs
ports:
- 6080:80
```