-
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.
Merge all dev, prod, pre-prod code. Use docker compose profiles to bu…
…ild and start the correct containers
- Loading branch information
1 parent
094460d
commit 1329b5e
Showing
8 changed files
with
109 additions
and
13 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
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
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,3 +1,5 @@ | ||
FROM nginx:1.19.0-alpine | ||
ARG PANKB_SERVER_TYPE=prod | ||
|
||
COPY ./default.conf /etc/nginx/conf.d/default.conf | ||
COPY ./default-$PANKB_SERVER_TYPE.conf /etc/nginx/conf.d/default.conf | ||
RUN [ "$PANKB_SERVER_TYPE" == "prod" ] && mkdir -p /etc/nginx/ssl/live/pankb.org || echo "Not in production" |
File renamed without changes.
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,43 @@ | ||
upstream django { | ||
server django_gunicorn:8000; | ||
} | ||
|
||
|
||
server { | ||
listen 80; | ||
listen [::]:80; | ||
|
||
server_name pankb.org www.pankb.org; | ||
server_tokens off; | ||
|
||
location /.well-known/acme-challenge/ { | ||
root /var/www/certbot; | ||
} | ||
|
||
location /static/ { | ||
alias /static/; | ||
} | ||
|
||
location / { | ||
return 301 https://$server_name$request_uri; | ||
} | ||
} | ||
|
||
|
||
server { | ||
listen 443 default_server ssl http2; | ||
listen [::]:443 ssl http2; | ||
|
||
server_name pankb.org www.pankb.org; | ||
|
||
ssl_certificate /etc/nginx/ssl/live/pankb.org/fullchain.pem; | ||
ssl_certificate_key /etc/nginx/ssl/live/pankb.org/privkey.pem; | ||
|
||
location /static/ { | ||
alias /static/; | ||
} | ||
|
||
location / { | ||
proxy_pass http://django; | ||
} | ||
} |