Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove server config #152

Merged
merged 2 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ public/
.hugo_build.lock
.vscode/
resources/_gen/
www/
www-dev/
assets/jsconfig.json
node_modules
hugo_stats.json
31 changes: 11 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# Freifunk Berlin

This is the repository for the website of the [Freifunk Community Berlin](https://berlin.freifunk.net).

The website is built using the static website generator Hugo.
This is the repository for the website of the [Freifunk Community Berlin](https://berlin.freifunk.net). The website is built using the static website generator Hugo.

## Install

Expand All @@ -12,47 +10,40 @@ The website is built using the static website generator Hugo.
- Install [Node](https://nodejs.org/en/download/package-manager/current) (>=20)
- Load js dependencies with `npm install`

## Run for development
## Development

For quick start you can use the hugo development server.

```console
hugo server -w
```

You can change the base address `-b` and the bind address `--bind` if your run it on a remote machine.

```console
hugo server -w -b http://localhost:1313/ --bind 0.0.0.0
```
## Production

You can set the environment variables `HUGO_MATRIX_ACCESS_TOKEN`, `HUGO_MATRIX_HOME_SERVER` and `HUGO_GITHUB_ACCESS_TOKEN` to get real activity informations. Else some dummy data is used.
First you must generate the content. You can set the environment variables `HUGO_MATRIX_ACCESS_TOKEN`, `HUGO_MATRIX_HOME_SERVER` and `HUGO_GITHUB_ACCESS_TOKEN` to get real activity informations. Else some dummy data is used.

```console
HUGO_GITHUB_ACCESS_TOKEN="secret" HUGO_MATRIX_ACCESS_TOKEN="secret" HUGO_MATRIX_HOME_SERVER="htps://matrix.org" hugo server -w
HUGO_GITHUB_ACCESS_TOKEN="<github_secret>" HUGO_MATRIX_ACCESS_TOKEN="<matrix_secret>" HUGO_MATRIX_HOME_SERVER="htps://matrix.org" hugo --minify -b <baseURL>
```

## Build for production

```console
hugo build --minify -b <baseURL>
```
The files are generated in the `public` directory and need to be served with a webserver (see deployment chapter).

## Structure

```text
├── .github/workflows # Config for pipelines to test and deploy
├── archetypes # Template for new content
├── content # Pages as markdown files
├── layouts/partials # Reusable elements
├── layouts # Reusable elements
├── static # Images and videos
├── themes # Theme, integrated via submodule
└── apache # Server configs
└── themes # Theme, integrated via submodule
```

## Deployment

The website is deployed automatically via GitHub actions. The main branch is at [berlin.freifunk.net](https://berlin.freifunk.net). The other branches could be accessed via `dev.berlin.freifunk.net/<BRANCH_NAME>/`.

The actions are defined in `.github/workflows` and could be configured with [GitHub variables and secrets](https://github.com/freifunk-berlin/berlin.freifunk.net/settings/secrets/actions). The configurations for the production and development webserver are in the `apache` directory.
The actions are defined in `.github/workflows` and could be configured with [GitHub variables and secrets](https://github.com/freifunk-berlin/berlin.freifunk.net/settings/secrets/actions). The content is served with [caddy](https://caddyserver.com/) on the Freifunk servers. The configurations for the production and development webserver are in the [Caddyfile](https://github.com/freifunk-berlin/ansible/blob/main/templates/Caddyfile_website.j2) as part of the ansible setup.

## Data fetching

Expand Down
33 changes: 0 additions & 33 deletions apache/dev.website.conf

This file was deleted.

116 changes: 0 additions & 116 deletions apache/website.conf

This file was deleted.

Loading