Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add config for 2024 #21

Merged
merged 4 commits into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 17 additions & 13 deletions conf/tw-pycon-org.conf
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@

upstream pycontw-2022 {
server pycontw-2022:8000;
upstream pycontw-2024 {
server pycontw-2024:8000;
}

upstream pycontw-2023 {
server pycontw-2023:8000;
}

upstream pycontw-2023-frontend {
server pycontw-2023-frontend:3000;
upstream pycontw-2024-frontend {
server pycontw-2024-frontend:3000;
}

server {
Expand Down Expand Up @@ -44,8 +40,8 @@ server {
}

# Default path
rewrite "^/$" /2023/en-us permanent;
rewrite "^(/(en-us|zh-hant)(/.*)?)$" /2023$1 permanent;
rewrite "^/$" /2024/en-us permanent;
rewrite "^(/(en-us|zh-hant)(/.*)?)$" /2024$1 permanent;
rewrite "^/(2016|2017|2018|2019|2020)/$" /$1/en-us/ permanent;
rewrite "^/(2014apac)/$" /$1/en/ permanent;

Expand Down Expand Up @@ -141,8 +137,16 @@ server {
proxy_set_header Host pycontw.github.io;
}

location ~ ^/2023 {
proxy_pass http://pycontw-2023-frontend;
location /2023 {
mattwang44 marked this conversation as resolved.
Show resolved Hide resolved
rewrite /$ $uri$index_name;
proxy_pass https://pycontw.github.io/pycon_archive_past_website/2023;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host pycontw.github.io;
}

location ~ ^/2024 {
proxy_pass http://pycontw-2024-frontend;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
Expand All @@ -151,7 +155,7 @@ server {
}

location ~ ^/prs {
proxy_pass http://pycontw-2023;
proxy_pass http://pycontw-2024;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
Expand Down
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ services:
- /var/www/letsencrypt:/var/www/letsencrypt
networks:
- pycontw-net
- network-2022
- network-2023
SivanYeh marked this conversation as resolved.
Show resolved Hide resolved
- network-2024

networks:
pycontw-net:
external: true
network-2022:
external: true
network-2023:
external: true
network-2024:
external: true