Skip to content

Commit

Permalink
Merge pull request #189 from lowercasename/instance-information
Browse files Browse the repository at this point in the history
Update docs and Docker Compose config
  • Loading branch information
lowercasename authored Feb 11, 2025
2 parents e89c342 + 51a0ecb commit fe5d47e
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 12 deletions.
2 changes: 1 addition & 1 deletion config/config.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ show_kofi = false
# 'Display this event/group on the public event/group list'.
show_public_event_list = false
# Which mail service to use to send emails to hosts and attendees. Options are
# 'nodemailer' or 'sendgrid'. Configure settings for this mail
# 'nodemailer', 'sendgrid', or 'none'. Configure settings for this mail
# service below.
mail_service = "none"
# An array of email addresses which are permitted to create events. If this is
Expand Down
3 changes: 3 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ services:
volumes:
# The path to Gathio's config folder - change to match your system
- ./gathio-docker/config:/app/config
# The path to Gathio's static, public pages including instance description
# and privacy policy - change to match your system
- ./gathio-docker/static:/app/static
# The path to Gathio's user-uploaded event images folder - change to match your system
- ./gathio-docker/images:/app/public/events
mongo:
Expand Down
44 changes: 33 additions & 11 deletions docs/running-gathio/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,24 +94,43 @@ The easiest way to run Gathio using Docker is by using the provided
`docker-compose` configuration. We provide a Docker image at [GitHub
Container Repository](https://github.com/lowercasename/gathio/pkgs/container/gathio).

Create a directory on your system where you'll keep the Gathio configuration
file and another where Gathio can store user-uploaded event images. Copy the
example config file into the config directory:
Clone the Gathio repository onto your system - you'll need a few files from it in a minute.

Create a few directories on your system:

- One where you'll keep the Gathio configuration file
- One where you'll keep Gathio's static files, such as the instance description
and any custom pages you may want to create
- And another where Gathio can store user-uploaded event images.

```bash
mkdir -p ~/docker/gathio-docker/{config,images,static}
```

Copy the example config file from the Gathio repository directory into the Docker config directory,
renaming it to `config.toml`:

```bash
mkdir -p ~/docker/gathio-docker/{config,images}
cp config/config.example.toml ~/docker/gathio-docker/config/config.toml
```

Under the `volumes` section of the `docker-compose.yml` configuration, adjust the
configuration volume to match the folder you created:
In the `docker-compose.yml` configuration file, adjust
the `volumes` configuration to match the three folders you created:

```dockerfile
volumes:
- '/home/username/docker/gathio-docker/config:/app/config'
- '/home/username/docker/gathio-docker/static:/app/static'
- '/home/username/docker/gathio-docker/images:/app/public/events'
```

As with all things in the Docker universe, two things seperated by a colon
means `<thing on host computer>:<thing inside Docker container>`. So
here you're saying "any files I put in the folder called
`/home/username/docker/gathio-docker/config` on my computer will appear inside
the Docker container at the path `/app/static`. Don't change the paths on the
Docker container side - only the ones on the host side!

Adjust any settings in the config file, especially the MongoDB URL, which should
read as follows for the standard Docker Compose config, and the email service if you
want to enable it:
Expand All @@ -121,19 +140,22 @@ mongodb_url = "mongodb://mongo:27017/gathio"
mail_service = "nodemailer"
```

You can copy the `docker-compose.yml` file into that same `gathio-docker` directory
you created - you don't need any of the source code. Once you're done, your directory
should look something like this:
You can copy the `docker-compose.yml` file into that same `gathio-docker`
directory you created - you don't need to keep any of the other source code. Once
you're done, your directory should look something like this:

```
gathio-docker
├── config
│ └── config.toml
├── docker-compose.yml
└── images
├── images
└── static
├── instance-description.md
└── privacy-policy.md
```

Finally, from wherever you've put your `docker-compose.yml` file, start the Docker stack:
Finally, from wherever you've put your `docker-compose.yml` file, start the Docker Compose stack:

```bash
cd gathio-docker
Expand Down

0 comments on commit fe5d47e

Please sign in to comment.