Skip to content
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
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,5 @@ EXPOSE 8000
CMD ["uwsgi", "--http-socket", ":8000", "--master", \
"--hook-master-start", "unix_signal:15 gracefully_kill_them_all", \
"--static-map", "/static=assets", "--static-map", "/media=media", \
"--mount", "/2024=pycontw2016/wsgi.py", "--manage-script-name", \
"--mount", "/2025=pycontw2016/wsgi.py", "--manage-script-name", \
"--offload-threads", "2"]
12 changes: 6 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ services:
context: .
dockerfile: Dockerfile
target: prod
container_name: pycontw-2024
hostname: pycontw-2024
container_name: pycontw-2025
hostname: pycontw-2025
entrypoint: ""
command:
# Hacky script for quick demonstration purpose
Expand All @@ -29,7 +29,7 @@ services:
restart: always
environment:
# Save us from having to type `--setting=pycontw2016.settings.production`
DJANGO_SETTINGS_MODULE: pycontw2016.settings.production.pycontw2024
DJANGO_SETTINGS_MODULE: pycontw2016.settings.production.pycontw2025
SCRIPT_NAME: /prs
SECRET_KEY: ${SECRET_KEY}
DATABASE_URL: ${DATABASE_URL}
Expand All @@ -40,9 +40,9 @@ services:
volumes:
- ${MEDIA_ROOT}:/usr/local/app/src/media
networks:
- network-2024
- network-2025

networks:
network-2024:
network-2025:
external: true
name: network-2024
name: network-2025
3 changes: 2 additions & 1 deletion src/pycontw2016/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,9 +311,10 @@ def node_bin(name):
('pycontw-2022', _('PyCon Taiwan 2022')),
('pycontw-2023', _('PyCon Taiwan 2023')),
('pycontw-2024', _('PyCon Taiwan 2024')),
('pycontw-2025', _('PyCon Taiwan 2025')),
]

CONFERENCE_DEFAULT_SLUG = 'pycontw-2024'
CONFERENCE_DEFAULT_SLUG = 'pycontw-2025'
TEMPLATES[0]['DIRS'][1] = os.path.join(
BASE_DIR, 'templates', CONFERENCE_DEFAULT_SLUG,
)
Expand Down
29 changes: 29 additions & 0 deletions src/pycontw2016/settings/production/pycontw2025.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import os

from django.utils.translation import gettext_lazy as _

from .base import * # noqa
from .base import BASE_DIR, STATICFILES_DIRS, TEMPLATES

# Override static and media URL for prefix in WSGI server.
# https://code.djangoproject.com/ticket/25598
STATIC_URL = '/prs/static/'
MEDIA_URL = '/prs/media/'

CONFERENCE_DEFAULT_SLUG = 'pycontw-2025'

TALK_PROPOSAL_DURATION_CHOICES = (
('NOPREF', _('No preference')),
('PREF15', _('Prefer 15min')),
('PREF30', _('Prefer 30min')),
('PREF45', _('Prefer 45min')),
)

TEMPLATES[0]['DIRS'][1] = os.path.join(
BASE_DIR, 'templates', CONFERENCE_DEFAULT_SLUG,
)
STATICFILES_DIRS[1] = os.path.join(
BASE_DIR, 'static', CONFERENCE_DEFAULT_SLUG, '_includes',
)

FRONTEND_HOST = 'https://tw.pycon.org/2025'
22 changes: 22 additions & 0 deletions src/pycontw2016/settings/testing/pycontw2025.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import os

from django.utils.translation import gettext_lazy as _

from .base import * # noqa
from .base import BASE_DIR, STATICFILES_DIRS, TEMPLATES

CONFERENCE_DEFAULT_SLUG = 'pycontw-2025'

TALK_PROPOSAL_DURATION_CHOICES = (
('NOPREF', _('No preference')),
('PREF15', _('Prefer 15min')),
('PREF30', _('Prefer 30min')),
('PREF45', _('Prefer 45min')),
)

TEMPLATES[0]['DIRS'][1] = os.path.join(BASE_DIR, 'templates', 'pycontw-2025')
STATICFILES_DIRS[1] = os.path.join(
BASE_DIR, 'static', CONFERENCE_DEFAULT_SLUG, '_includes',
)

EVENTS_PUBLISHED = False
Loading