Skip to content

Commit

Permalink
feat: add config for 2024
Browse files Browse the repository at this point in the history
add config for 2024 including tw-pycon-org.conf and docker-compose.yml
  • Loading branch information
SivanYeh committed Jan 22, 2024
1 parent b5c34c3 commit cca92e0
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 14 deletions.
30 changes: 19 additions & 11 deletions conf/tw-pycon-org.conf
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@

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

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

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

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

server {
Expand Down Expand Up @@ -44,8 +44,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 +141,16 @@ server {
proxy_set_header Host pycontw.github.io;
}

location ~ ^/2023 {
proxy_pass http://pycontw-2023-frontend;
location /2023 {
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 +159,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
- network-2024

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

0 comments on commit cca92e0

Please sign in to comment.