This repository has been archived by the owner on Oct 30, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Chore: Add nginx container for AWS deployment
Fix gunicorn CMD for triage-portal container Signed-off-by: Anton Baranov <abaranov@linuxfoundation.org>
- Loading branch information
Showing
5 changed files
with
64 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
version: '3.9' | ||
|
||
services: | ||
redis: | ||
image: redis:latest | ||
restart: unless-stopped | ||
# network_mode: service:db | ||
volumes: | ||
- redis-data:/data | ||
tiriage-nginx: | ||
image: nginx | ||
build: | ||
context: src/nginx | ||
ports: | ||
- "8001:80" | ||
depends_on: | ||
- triage-portal | ||
volumes: | ||
- triage-portal-static:/opt/omega/static | ||
environment: | ||
- TRIAGE_PORTAL_HOST=triage-portal | ||
triage-portal: | ||
image: omega-triage-portal | ||
build: | ||
context: src | ||
container_name: omega-triage-portal | ||
depends_on: | ||
redis: | ||
condition: service_started | ||
env_file: | ||
- ./src/.env-template | ||
volumes: | ||
- triage-portal-static:/opt/omega/static | ||
|
||
volumes: | ||
redis-data: | ||
triage-portal-static: |
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,7 @@ | ||
FROM nginx:1.24.0-alpine | ||
|
||
ENV TRIAGE_PORTAL_HOST=localhost | ||
RUN rm /etc/nginx/conf.d/default.conf | ||
COPY nginx.conf /etc/nginx/conf.d | ||
COPY templates/ /etc/nginx/templates/ | ||
EXPOSE 80 |
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,16 @@ | ||
server { | ||
|
||
listen 80; | ||
|
||
location /static/ { | ||
alias /opt/omega/static/; | ||
} | ||
|
||
location / { | ||
proxy_pass http://triage_portal; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header Host $host; | ||
proxy_redirect off; | ||
} | ||
|
||
} |
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,3 @@ | ||
upstream triage_portal { | ||
server ${TRIAGE_PORTAL_HOST}:8001; | ||
} |