-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #356 from seanmorley15/development
AdventureLog v0.7.1
- Loading branch information
Showing
117 changed files
with
5,694 additions
and
253,177 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,29 @@ | ||
{ | ||
"git.ignoreLimitWarning": true | ||
"git.ignoreLimitWarning": true, | ||
"i18n-ally.localesPaths": [ | ||
"frontend/src/locales", | ||
"backend/server/backend/lib/python3.12/site-packages/allauth/locale", | ||
"backend/server/backend/lib/python3.12/site-packages/dj_rest_auth/locale", | ||
"backend/server/backend/lib/python3.12/site-packages/rest_framework/locale", | ||
"backend/server/backend/lib/python3.12/site-packages/rest_framework_simplejwt/locale", | ||
"backend/server/backend/lib/python3.12/site-packages/django/conf/locale", | ||
"backend/server/backend/lib/python3.12/site-packages/django/contrib/messages", | ||
"backend/server/backend/lib/python3.12/site-packages/allauth/templates/account/messages", | ||
"backend/server/backend/lib/python3.12/site-packages/allauth/templates/mfa/messages", | ||
"backend/server/backend/lib/python3.12/site-packages/allauth/templates/socialaccount/messages", | ||
"backend/server/backend/lib/python3.12/site-packages/allauth/templates/usersessions/messages", | ||
"backend/server/backend/lib/python3.12/site-packages/django/contrib/admindocs/locale", | ||
"backend/server/backend/lib/python3.12/site-packages/django/contrib/auth/locale", | ||
"backend/server/backend/lib/python3.12/site-packages/django/contrib/admin/locale", | ||
"backend/server/backend/lib/python3.12/site-packages/django/contrib/contenttypes/locale", | ||
"backend/server/backend/lib/python3.12/site-packages/django/contrib/flatpages/locale", | ||
"backend/server/backend/lib/python3.12/site-packages/django/contrib/humanize/locale", | ||
"backend/server/backend/lib/python3.12/site-packages/django/contrib/gis/locale", | ||
"backend/server/backend/lib/python3.12/site-packages/django/contrib/redirects/locale", | ||
"backend/server/backend/lib/python3.12/site-packages/django/contrib/postgres/locale", | ||
"backend/server/backend/lib/python3.12/site-packages/django/contrib/sessions/locale", | ||
"backend/server/backend/lib/python3.12/site-packages/django/contrib/sites/locale", | ||
"backend/server/backend/lib/python3.12/site-packages/rest_framework/templates/rest_framework/docs/langs" | ||
], | ||
"i18n-ally.keystyle": "nested" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,42 +53,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. | [email protected] | | ||
| `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. | [email protected] | | ||
| `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 publicly accessible url to the **frontend** container. This link should be accessible for all users. Used for email generation. | 'http://localhost:8015' | | ||
|
||
## Running the Containers | ||
|
||
|
@@ -119,8 +100,6 @@ View all of your adventures on a map, with the ability to filter by visit status | |
|
||
![Region Page](screenshots/regions.png) | ||
|
||
️ | ||
|
||
# About AdventureLog | ||
|
||
AdventureLog is a Svelte Kit and Django application that utilizes a PostgreSQL database. Users can log the adventures they have experienced, as well as plan future ones. Key features include: | ||
|
@@ -152,10 +131,3 @@ AdventureLog is licensed under the GNU General Public License v3.0. | |
|
||
- Logo Design by [redtechtiger](https://github.com/redtechtiger) | ||
- WorldTravel Dataset [dr5hn/countries-states-cities-database](https://github.com/dr5hn/countries-states-cities-database) | ||
- [Mexico GEOJSON](https://cartographyvectors.com/map/784-mexico-with-states) | ||
- [Japan GEOJSON](https://cartographyvectors.com/map/361-japan) | ||
- [Ireland GEOJSON](https://cartographyvectors.com/map/1399-ireland-provinces) | ||
- [Sweden GEOJSON](https://cartographyvectors.com/map/1521-sweden-with-regions) | ||
- [Switzerland GEOJSON](https://cartographyvectors.com/map/1522-switzerland-with-regions) | ||
- [Iceland GEOJSON](https://cartographyvectors.com/map/1453-iceland-with-regions) | ||
- [Austria GEOJSON](https://github.com/codeforgermany/click_that_hood/blob/main/public/data/austria-states.geojson) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
worker_processes 1; | ||
events { | ||
worker_connections 1024; | ||
} | ||
|
||
http { | ||
include /etc/nginx/mime.types; | ||
default_type application/octet-stream; | ||
|
||
sendfile on; | ||
keepalive_timeout 65; | ||
|
||
upstream django { | ||
server server:8000; # Use the internal Docker networking | ||
} | ||
|
||
server { | ||
listen 80; # NGINX always listens on port 80 inside the container | ||
server_name localhost; | ||
|
||
location / { | ||
proxy_pass http://server:8000; # Explicitly forward to Django service | ||
proxy_set_header Host $host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
} | ||
|
||
|
||
location /static/ { | ||
alias /code/staticfiles/; # Serve static files directly | ||
} | ||
|
||
location /media/ { | ||
alias /code/media/; # Serve media files directly | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
█████╗ ██████╗ ██╗ ██╗███████╗███╗ ██╗████████╗██╗ ██╗██████╗ ███████╗██╗ ██████╗ ██████╗ | ||
██╔══██╗██╔══██╗██║ ██║██╔════╝████╗ ██║╚══██╔══╝██║ ██║██╔══██╗██╔════╝██║ ██╔═══██╗██╔════╝ | ||
███████║██║ ██║██║ ██║█████╗ ██╔██╗ ██║ ██║ ██║ ██║██████╔╝█████╗ ██║ ██║ ██║██║ ███╗ | ||
██╔══██║██║ ██║╚██╗ ██╔╝██╔══╝ ██║╚██╗██║ ██║ ██║ ██║██╔══██╗██╔══╝ ██║ ██║ ██║██║ ██║ | ||
██║ ██║██████╔╝ ╚████╔╝ ███████╗██║ ╚████║ ██║ ╚██████╔╝██║ ██║███████╗███████╗╚██████╔╝╚██████╔╝ | ||
╚═╝ ╚═╝╚═════╝ ╚═══╝ ╚══════╝╚═╝ ╚═══╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚══════╝ ╚═════╝ ╚═════╝ | ||
“The world is full of wonderful things you haven't seen yet. Don't ever give up on the chance of seeing them.” - J.K. Rowling |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.