-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b3604fb
commit b266a0f
Showing
3 changed files
with
90 additions
and
4 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,5 +1,6 @@ | ||
version: '3' | ||
services: | ||
|
||
postgres: | ||
image: postgres:latest | ||
environment: | ||
|
@@ -13,7 +14,6 @@ services: | |
networks: | ||
- backend | ||
|
||
# Refuapp Backend | ||
refuapp-backend: | ||
build: | ||
context: ./refuapp-backend # Path to your project directory | ||
|
@@ -29,14 +29,56 @@ services: | |
networks: | ||
- backend | ||
|
||
swag: | ||
image: lscr.io/linuxserver/swag | ||
container_name: swag | ||
cap_add: | ||
- NET_ADMIN | ||
environment: | ||
- PUID=1000 | ||
- PGID=1000 | ||
- TZ=Europe/Madrid | ||
- URL=api.pofnet.net | ||
- VALIDATION=http | ||
- [email protected] | ||
- PROD=true | ||
volumes: | ||
- /home/ferran/refuapp-deploy/nginx/site-confs:/config/nginx/site-confs | ||
- /home/ferran/www/:/var/www | ||
- /home/ferran/static/:/static | ||
ports: | ||
- 443:443 | ||
- 80:80 | ||
restart: unless-stopped | ||
depends_on: | ||
- refuapp-backend | ||
networks: | ||
- backend | ||
|
||
|
||
networks: | ||
backend: | ||
driver: "bridge" | ||
|
||
volumes: | ||
postgres_data: | ||
driver: local # Define the driver and options under the volume name | ||
driver: local | ||
driver_opts: | ||
type: none | ||
device: /home/ferran/data/ | ||
device: /home/ferran/data | ||
o: bind | ||
frontend_page: | ||
driver: local | ||
driver_opts: | ||
type: none | ||
device: /home/ferran/web | ||
static_files: | ||
driver: local | ||
driver_opts: | ||
type: none | ||
device: /home/ferran/static | ||
swag_config_files: | ||
driver: local | ||
driver_opts: | ||
type: none | ||
device: /home/ferran/refuapp-deploy |
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,44 @@ | ||
## Version 2023/06/05 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/nginx/site-confs/default.conf.sample | ||
|
||
# redirect all traffic to https | ||
server { | ||
listen 80 default_server; | ||
listen [::]:80 default_server; | ||
|
||
location / { | ||
return 301 https://$host$request_uri; | ||
} | ||
} | ||
|
||
# main server block | ||
server { | ||
listen 443 ssl http2 default_server; | ||
listen [::]:443 ssl http2 default_server; | ||
|
||
server_name _; | ||
|
||
include /config/nginx/ssl.conf; | ||
|
||
# root /config/www; | ||
# index index.html index.htm index.php; | ||
|
||
# enable subfolder method reverse proxy confs | ||
# include /config/nginx/proxy-confs/*.subfolder.conf; | ||
|
||
location /api { | ||
rewrite ^/api/(.*) /$1 break; | ||
proxy_set_header Host $http_host; | ||
proxy_pass http://refuapp-backend:8000/; | ||
} | ||
|
||
# Root route | ||
location / { | ||
alias /var/www/; | ||
index index.html; | ||
} | ||
|
||
# Static files | ||
location /static { | ||
alias /static/; | ||
} | ||
} |
Submodule refuapp-backend
updated
13 files
+5 −0 | .gitignore | |
+1 −1 | models/refuges.py | |
+2 −0 | mypy.ini | |
+218 −0 | populate.py | |
+1 −0 | refuges.geojson | |
+5 −0 | requirements.txt | |
+16 −6 | routers/auth.py | |
+3 −0 | schemas/auth.py | |
+8 −5 | security/token.py | |
+14 −23 | services/auth.py | |
+12 −1 | services/user.py | |
+ − | static/images/refuges/no-photo.png | |
+1 −1 | validators/refuges.py |