1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-08-02 03:35:18 +02:00

Merge pull request #356 from seanmorley15/development

AdventureLog v0.7.1
This commit is contained in:
Sean Morley 2024-11-13 09:06:32 -05:00 committed by GitHub
commit 0ea948c62c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
117 changed files with 5707 additions and 253190 deletions

View file

@ -0,0 +1,28 @@
---
sidebar_position: 2
---
# Change Email Backend
To change the email backend, you can set the following variable in your docker-compose.yml under the server service:
## Using Console (default)
```yaml
environment:
- EMAIL_BACKEND='console'
```
## With SMTP
```yaml
environment:
- EMAIL_BACKEND='email'
- EMAIL_HOST='smtp.gmail.com'
- EMAIL_USE_TLS=False
- EMAIL_PORT=587
- EMAIL_USE_SSL=True
- EMAIL_HOST_USER='user'
- EMAIL_HOST_PASSWORD='password'
- DEFAULT_FROM_EMAIL='user@example.com'
```

View file

@ -0,0 +1,14 @@
---
sidebar_position: 3
---
# Umami Analytics (optional)
Umami Analytics is a free, open-source, and privacy-focused web analytics tool that can be used as an alternative to Google Analytics. Learn more about Umami Analytics [here](https://umami.is/).
To enable Umami Analytics for your AdventureLog instance, you can set the following variables in your `docker-compose.yml` under the `web` service:
```yaml
PUBLIC_UMAMI_SRC=https://cloud.umami.is/script.js # If you are using the hosted version of Umami
PUBLIC_UMAMI_WEBSITE_ID=
```

View file

@ -0,0 +1,8 @@
{
"label": "Guides 📚",
"position": 4,
"link": {
"type": "generated-index",
"description": "Guides for AdventureLog."
}
}

View file

@ -0,0 +1,37 @@
---
sidebar_position: 2
---
# AdventureLog v0.7.1 Migration
In order to make installation easier, the AdventureLog v0.7.1 release has **removed the need for a seperate nginx container** and cofig to serve the media files. Instead, the media files are now served by an instance of nginx running in the same container as the Django application.
## Docker Compose Changes
:::note
You can also just use the new `docker-compose.yml` file in the repository and change the environment variables to match your setup.
:::
1. Remove the `nginx` service from your `docker-compose.yml` file.
2. Update the `PUBLIC_URL` environment variable in the `server` service (backend) to match the address of your **server**, instead of the previous nginx instance. For example, if your server is exposed to `http://localhost:8000`, set `PUBLIC_URL` to `http://localhost:8000`. If you are using a domain name, set `PUBLIC_URL` to `https://api.yourdomain.com` as an example.
3. Change port mapping for the `server` service. Right now it probably looks like this:
```yaml
ports:
- "your-exposed-port:8000"
```
Change it to:
```yaml
ports:
- "your-exposed-port:80"
```
This is because the nginx instance in the container is now serving the Django application on port 80. The port on the left side of the colon is the port on your host machine and this can be changed to whatever you want. The port on the right side of the colon is the port the Django application is running on in the container and should not be changed.
That's it! You should now be able to run the application with the new configuration! This update also includes some performance enhancements so there should be a slight speed increase as well, especially with multiple users.
Enjoy the new version of AdventureLog! 🎉
View the full changelog [here](https://github.com/seanmorley15/AdventureLog/releases/tag/v0.7.1)
Report any bugs [GitHub repository](https://github.com/seanmorley15/adventurelog) or ask for help in the [Discord server](https://discord.gg/wRbQ9Egr8C).

View file

@ -30,42 +30,23 @@ Here is a summary of the configuration options available in the `docker-compose.
| Name | Required | Description | Default Value |
| ------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------- |
| `PUBLIC_SERVER_URL` | Yes | What the frontend SSR server uses to connect to the backend. | http://server:8000 |
| `ORIGIN` | Sometimes | Not needed if using HTTPS. If not, set it to the domain of what you will acess the app from. | http://localhost:8080 |
| `ORIGIN` | Sometimes | Not needed if using HTTPS. If not, set it to the domain of what you will acess the app from. | http://localhost:8015 |
| `BODY_SIZE_LIMIT` | Yes | Used to set the maximum upload size to the server. Should be changed to prevent someone from uploading too much! Custom values must be set in **kiliobytes**. | Infinity |
### Backend Container (server)
| Name | Required | Description | Default Value |
| ----------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------- |
| `PGHOST` | Yes | Databse host. | db |
| `PGDATABASE` | Yes | Database. | database |
| `PGUSER` | Yes | Database user. | adventure |
| `PGPASSWORD` | Yes | Database password. | changeme123 |
| `DJANGO_ADMIN_USERNAME` | Yes | Default username. | admin |
| `DJANGO_ADMIN_PASSWORD` | Yes | Default password, change after inital login. | admin |
| `DJANGO_ADMIN_EMAIL` | Yes | Default user's email. | admin@example.com |
| `PUBLIC_URL` | Yes | This is the publically accessible url to the **nginx** container. You should be able to acess nginx from this url where you access your app. | http://127.0.0.1:81 |
| `CSRF_TRUSTED_ORIGINS` | Yes | Need to be changed to the orgins where you use your backend server and frontend. These values are comma seperated. | Needs to be changed. |
| `FRONTEND_URL` | Yes | This is the publically accessible url to the **frontend** container. This link should be accessable for all users. Used for email generation. | http://localhost:3000 |
### Proxy Container (nginx) Configuration
In order to use media files in a production environment, you need to configure the `nginx` container to serve the media files. The container is already in the docker compose file but you need to do a few things to make it work.
1. Create a directory called `proxy` in the same directory as the `docker-compose.yml` file.
2. Create a file called `nginx.conf` in the `proxy` directory.
3. Add the following configuration to the `nginx.conf` file:
```nginx
server {
listen 80;
server_name localhost;
location /media/ {
alias /app/media/;
}
}
```
| Name | Required | Description | Default Value |
| ----------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- |
| `PGHOST` | Yes | Databse host. | db |
| `PGDATABASE` | Yes | Database. | database |
| `PGUSER` | Yes | Database user. | adventure |
| `PGPASSWORD` | Yes | Database password. | changeme123 |
| `DJANGO_ADMIN_USERNAME` | Yes | Default username. | admin |
| `DJANGO_ADMIN_PASSWORD` | Yes | Default password, change after inital login. | admin |
| `DJANGO_ADMIN_EMAIL` | Yes | Default user's email. | admin@example.com |
| `PUBLIC_URL` | Yes | This needs to match the outward port of the server and be accessible from where the app is used. It is used for the creation of image urls. | 'http://localhost:8016' |
| `CSRF_TRUSTED_ORIGINS` | Yes | Need to be changed to the orgins where you use your backend server and frontend. These values are comma seperated. | http://localhost:8016 |
| `FRONTEND_URL` | Yes | This is the publically accessible url to the **frontend** container. This link should be accessable for all users. Used for email generation. | 'http://localhost:8015' |
## Running the Containers

View file

@ -3,7 +3,7 @@ import type { Config } from "@docusaurus/types";
import type * as Preset from "@docusaurus/preset-classic";
const config: Config = {
title: "Adventure Log",
title: "AdventureLog",
tagline: "Embark, Explore, Remember. 🗺️",
favicon: "img/favicon.png",
@ -15,8 +15,8 @@ const config: Config = {
// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: "facebook", // Usually your GitHub org/user name.
projectName: "docusaurus", // Usually your repo name.
organizationName: "seanmorley", // Usually your GitHub org/user name.
projectName: "adventurelog", // Usually your repo name.
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "warn",
@ -40,7 +40,7 @@ const config: Config = {
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl:
"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/",
"https://github.com/seanmorley15/AdventureLog/tree/main/documentation",
},
// blog: {
// showReadingTime: true,
@ -65,9 +65,9 @@ const config: Config = {
// Replace with your project's social card
image: "img/docusaurus-social-card.jpg",
navbar: {
title: "Adventure Log Docs",
title: "AdventureLog Docs",
logo: {
alt: "My Site Logo",
alt: "AdventureLog Logo",
src: "img/favicon.png",
},
items: [
@ -77,12 +77,22 @@ const config: Config = {
position: "left",
label: "Documentation",
},
{
to: "https://www.buymeacoffee.com/seanmorley15",
label: "Sponsor 💖",
position: "right",
},
// { to: "/blog", label: "Blog", position: "left" },
{
href: "https://github.com/seanmorley15/adventurelog",
to: "https://github.com/seanmorley15/adventurelog",
label: "GitHub",
position: "right",
},
{
to: "https://discord.gg/wRbQ9Egr8C",
label: "Discord",
position: "right",
},
],
},
footer: {
@ -108,6 +118,10 @@ const config: Config = {
label: "GitHub",
href: "https://github.com/seanmorley15/adventurelog",
},
{
label: "Discord",
href: "https://discord.gg/wRbQ9Egr8C",
},
],
},
// {

View file

@ -1,6 +1,6 @@
{
"name": "my-website",
"version": "0.0.0",
"name": "adventurelog-docs",
"version": "0.7.1",
"private": true,
"scripts": {
"docusaurus": "docusaurus",

View file

@ -1,4 +1,4 @@
import type {SidebarsConfig} from '@docusaurus/plugin-content-docs';
import type { SidebarsConfig } from "@docusaurus/plugin-content-docs";
/**
* Creating a sidebar enables you to:
@ -12,7 +12,7 @@ import type {SidebarsConfig} from '@docusaurus/plugin-content-docs';
*/
const sidebars: SidebarsConfig = {
// By default, Docusaurus generates a sidebar from the docs folder structure
tutorialSidebar: [{type: 'autogenerated', dirName: '.'}],
tutorialSidebar: [{ type: "autogenerated", dirName: "." }],
// But you can create a sidebar manually
/*

Binary file not shown.

Before

Width:  |  Height:  |  Size: 144 KiB

After

Width:  |  Height:  |  Size: 87 KiB

Before After
Before After