-
Notifications
You must be signed in to change notification settings - Fork 1
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
1de2b8a
commit b36ec5d
Showing
8 changed files
with
74 additions
and
102 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 |
---|---|---|
|
@@ -3,4 +3,4 @@ venv | |
db.sqlite3 | ||
.idea | ||
.vscode | ||
.env | ||
.env |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,34 @@ | ||
version: '3' | ||
|
||
volumes: | ||
pg_data: | ||
static: | ||
media: | ||
|
||
services: | ||
db: | ||
image: postgres:13 | ||
env_file: .env | ||
volumes: | ||
- pg_data:/var/lib/postgresql/data | ||
backend: | ||
image: reamisd/backend_ipr:latest | ||
env_file: .env | ||
depends_on: | ||
- db | ||
volumes: | ||
- static:/app/static | ||
- media:/app/media | ||
gateway: | ||
image: nginx:latest | ||
depends_on: | ||
- backend | ||
image: reamisd/gateway_ipr:latest | ||
env_file: .env | ||
ports: | ||
- "8000:80" | ||
- "8080:80" | ||
volumes: | ||
- static:/static | ||
- media:/media | ||
- media:/media | ||
- ./default.conf:/etc/nginx/conf.d/default.conf | ||
- ./error.log:/var/log/nginx/error.log | ||
- ./access.log:/var/log/nginx/access.log |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
server { | ||
listen 80; | ||
server_name _; | ||
|
||
location / { | ||
proxy_pass http://backend:8000; | ||
proxy_set_header Host $http_host; | ||
proxy_redirect off; | ||
proxy_set_header X-Forwarded-For $remote_addr; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
client_max_body_size 10m; | ||
} | ||
} |
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,22 +1,17 @@ | ||
server { | ||
listen 80; | ||
index index.html; | ||
client_max_body_size 20M; | ||
server_tokens off; | ||
listen 80; | ||
server_name _; | ||
|
||
location /static/ { | ||
alias /static/; | ||
} | ||
|
||
location /api/v1/ { | ||
proxy_set_header Host $http_host; | ||
proxy_pass http://backend:8000/api/v1/; | ||
} | ||
location /admin/ { | ||
proxy_set_header Host $http_host; | ||
proxy_pass http://backend:8000/admin/; | ||
} | ||
location /media/ { | ||
alias /media/; | ||
} | ||
location /static/ { | ||
alias /static/; | ||
} | ||
} | ||
location / { | ||
proxy_pass http://backend:8000; | ||
proxy_set_header Host $http_host; | ||
proxy_redirect off; | ||
proxy_set_header X-Forwarded-For $remote_addr; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
client_max_body_size 10m; | ||
} | ||
} |