├── .gitignore ├── local-setup ├── .env ├── config │ ├── nginx │ │ ├── nginx-certbot.env │ │ └── user_conf │ │ │ └── eventyay-app.conf │ └── postgres │ │ └── docker-entrypoint-initdb.d │ │ └── create-multiple-postgresql-databases.sh ├── pretalx.cfg ├── setup.txt ├── pretix.cfg └── docker-compose.yml ├── .env.example ├── config ├── nginx │ ├── nginx-certbot.env │ └── user_conf │ │ ├── 00_load_modules.conf │ │ ├── eventyay-talk.conf │ │ ├── eventyay-ticket.conf │ │ ├── eventyay-video.conf │ │ └── eventyay-app.conf ├── video │ └── venueless.cfg ├── postgres │ └── docker-entrypoint-initdb.d │ │ └── create-multiple-postgresql-databases.sh ├── talk │ └── pretalx.cfg └── ticket │ └── pretix.cfg ├── archive ├── pretalx.cfg ├── pretix.cfg └── docker-compose.yml ├── README ├── docker-compose.yml ├── docker-compose-dev.yml ├── README.development.md └── LICENSE /.gitignore: -------------------------------------------------------------------------------- 1 | data 2 | config/nginx/letsencrypt 3 | .env 4 | -------------------------------------------------------------------------------- /local-setup/.env: -------------------------------------------------------------------------------- 1 | POSTGRES_USER=CHANGEME_eyadmin 2 | POSTGRES_PASSWORD=CHANGEME_eypass 3 | VOLUMES_DIR=./data 4 | CONFIG_DIR=./config 5 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | POSTGRES_USER=CHANGEME_eyadmin 2 | POSTGRES_PASSWORD=CHANGEME_eypass 3 | VOLUMES_DIR=./data 4 | CONFIG_DIR=./config 5 | WATCHTOWER_NOTIFICATION_URL= 6 | EVENTYAY_TALK_REPO=../eventyay-talk 7 | EVENTYAY_TICKET_REPO=../eventyay-tickets 8 | EVENTYAY_VIDEO_REPO=../eventyay-video 9 | -------------------------------------------------------------------------------- /config/nginx/nginx-certbot.env: -------------------------------------------------------------------------------- 1 | # Required 2 | CERTBOT_EMAIL=your@email.org 3 | 4 | # Optional (Defaults) 5 | DHPARAM_SIZE=2048 6 | ELLIPTIC_CURVE=secp256r1 7 | RENEWAL_INTERVAL=8d 8 | RSA_KEY_SIZE=2048 9 | STAGING=0 10 | USE_ECDSA=1 11 | 12 | # Advanced (Defaults) 13 | CERTBOT_AUTHENTICATOR=webroot 14 | CERTBOT_DNS_PROPAGATION_SECONDS="" 15 | DEBUG=0 16 | USE_LOCAL_CA=0 17 | -------------------------------------------------------------------------------- /local-setup/config/nginx/nginx-certbot.env: -------------------------------------------------------------------------------- 1 | # Required 2 | CERTBOT_EMAIL=your@email.org 3 | 4 | # Optional (Defaults) 5 | DHPARAM_SIZE=2048 6 | ELLIPTIC_CURVE=secp256r1 7 | RENEWAL_INTERVAL=8d 8 | RSA_KEY_SIZE=2048 9 | STAGING=0 10 | USE_ECDSA=1 11 | 12 | # Advanced (Defaults) 13 | CERTBOT_AUTHENTICATOR=webroot 14 | CERTBOT_DNS_PROPAGATION_SECONDS="" 15 | DEBUG=0 16 | USE_LOCAL_CA=0 17 | -------------------------------------------------------------------------------- /config/video/venueless.cfg: -------------------------------------------------------------------------------- 1 | [venueless] 2 | url=https://app.eventyay.com 3 | short_url=https://app.eventyay.com 4 | base_path=/video 5 | domain_path=app.eventyay.com 6 | 7 | [database] 8 | backend=postgresql 9 | name=ey_video_db 10 | user=CHANGEME_eyadmin 11 | password=CHANGEME_eypass 12 | host=eventyay-postgres 13 | 14 | [redis] 15 | ; In most docker setups, 172.17.0.1 is the address of the docker host. Adjuts 16 | ; this to wherever your database is running, e.g. the name of a linked container 17 | ; host=172.0.0.1 18 | ; Replace with the password you chose above 19 | ; auth=mysecurepassword 20 | 21 | [urls] 22 | media=https://app.eventyay.com:8443/media/ 23 | 24 | [django] 25 | secret=CHANGEME 26 | -------------------------------------------------------------------------------- /config/postgres/docker-entrypoint-initdb.d/create-multiple-postgresql-databases.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | set -u 5 | 6 | function create_user_and_database() { 7 | local database=$1 8 | echo " Creating user and database '$database'" 9 | psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" <<-EOSQL 10 | CREATE USER $database; 11 | CREATE DATABASE $database; 12 | GRANT ALL PRIVILEGES ON DATABASE $database TO $database; 13 | EOSQL 14 | } 15 | 16 | if [ -n "$POSTGRES_MULTIPLE_DATABASES" ]; then 17 | echo "Multiple database creation requested: $POSTGRES_MULTIPLE_DATABASES" 18 | for db in $(echo $POSTGRES_MULTIPLE_DATABASES | tr ',' ' '); do 19 | create_user_and_database $db 20 | done 21 | echo "Multiple databases created" 22 | fi 23 | -------------------------------------------------------------------------------- /config/nginx/user_conf/00_load_modules.conf: -------------------------------------------------------------------------------- 1 | # these modules were loaded on the eventyay metal server 2 | # THIS DOES NOT WORK HERE, nginx says that load_module is 3 | # not allowed here 4 | #load_module modules/ngx_http_auth_pam_module.so; 5 | #load_module modules/ngx_http_dav_ext_module.so; 6 | #load_module modules/ngx_http_echo_module.so; 7 | #load_module modules/ngx_http_geoip2_module.so; 8 | #load_module modules/ngx_http_image_filter_module.so; 9 | #load_module modules/ngx_http_subs_filter_module.so; 10 | #load_module modules/ngx_http_upstream_fair_module.so; 11 | #load_module modules/ngx_http_xslt_filter_module.so; 12 | #load_module modules/ngx_mail_module.so; 13 | #load_module modules/ngx_stream_module.so; 14 | #load_module modules/ngx_stream_geoip2_module.so; 15 | 16 | -------------------------------------------------------------------------------- /local-setup/config/postgres/docker-entrypoint-initdb.d/create-multiple-postgresql-databases.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | set -u 5 | 6 | function create_user_and_database() { 7 | local database=$1 8 | echo " Creating user and database '$database'" 9 | psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" <<-EOSQL 10 | CREATE USER $database; 11 | CREATE DATABASE $database; 12 | GRANT ALL PRIVILEGES ON DATABASE $database TO $database; 13 | EOSQL 14 | } 15 | 16 | if [ -n "$POSTGRES_MULTIPLE_DATABASES" ]; then 17 | echo "Multiple database creation requested: $POSTGRES_MULTIPLE_DATABASES" 18 | for db in $(echo $POSTGRES_MULTIPLE_DATABASES | tr ',' ' '); do 19 | create_user_and_database $db 20 | done 21 | echo "Multiple databases created" 22 | fi 23 | -------------------------------------------------------------------------------- /archive/pretalx.cfg: -------------------------------------------------------------------------------- 1 | [filesystem] 2 | data = /data 3 | media = /data/media 4 | logs = /data/logs 5 | 6 | [site] 7 | ; never run debug in production 8 | debug = False 9 | url = http://localhost 10 | 11 | [database] 12 | backend = postgresql 13 | name = eventyay_db 14 | user = postgres_db_user_changeme 15 | password = postgres_db_pwd_changeme 16 | host = db 17 | port = 5432 18 | 19 | [mail] 20 | from = office@fossasia.org 21 | host = smtp 22 | port = 25 23 | #user = admin 24 | #password = something 25 | #tls = False 26 | #ssl = True 27 | 28 | [celery] 29 | backend = redis://pretalx-redis/1 30 | broker = redis://pretalx-redis/2 31 | 32 | [redis] 33 | location=redis://pretalx-redis/0 34 | ; Remove the following line if you are unsure about your redis' security 35 | ; to reduce impact if redis gets compromised. 36 | sessions=true 37 | -------------------------------------------------------------------------------- /config/nginx/user_conf/eventyay-talk.conf: -------------------------------------------------------------------------------- 1 | server { 2 | server_name wikimania.eventyay.com; 3 | 4 | rewrite ^/$ http://wikimania.eventyay.com/Wikimania/schedule redirect; 5 | 6 | location /media { 7 | root /talk-data; 8 | } 9 | 10 | location /2024/talk/UBRGFS/ { 11 | rewrite ^/2024/talk/UBRGFS/$ /Wikimania/talk/UBRGFS/ permanent; 12 | return 301 https://app.eventyay.com/talk$request_uri; 13 | } 14 | 15 | location / { 16 | return 301 https://app.eventyay.com/talk$request_uri; # Redirecting to a different path 17 | } 18 | 19 | 20 | listen 443 ssl; 21 | listen [::]:443 ssl; 22 | ssl_certificate /etc/letsencrypt/live/wikimania.eventyay.com/fullchain.pem; 23 | ssl_certificate_key /etc/letsencrypt/live/wikimania.eventyay.com/privkey.pem; 24 | ssl_trusted_certificate /etc/letsencrypt/live/wikimania.eventyay.com/chain.pem; 25 | ssl_dhparam /etc/letsencrypt/dhparams/dhparam.pem; 26 | 27 | } 28 | 29 | -------------------------------------------------------------------------------- /config/nginx/user_conf/eventyay-ticket.conf: -------------------------------------------------------------------------------- 1 | server { 2 | server_name wikimania-tickets.eventyay.com; 3 | 4 | rewrite ^/$ http://wikimania-tickets.eventyay.com/wikiorg/Wikimania redirect; 5 | 6 | rewrite ^(.*)/wm/(.*)$ $1/wikiorg/$2 permanent; 7 | 8 | location /media { 9 | # root /mnt/HC_Volume_2665185/pretalx; 10 | root /ticket-data; 11 | 12 | # we link wikiorg -> wm in /mnt/HC_Volume_2665185/volumes/eventyay-ticket/data/media/pub 13 | # TODO NP 20240727 14 | # maybe that could have been done by adding the above rewrite statement 15 | # also here. I thought the above is enough ... 16 | } 17 | 18 | location / { 19 | return 301 https://app.eventyay.com/tickets$request_uri; # Redirecting to a different path 20 | } 21 | 22 | listen 443 ssl; 23 | listen [::]:443 ssl; 24 | ssl_certificate /etc/letsencrypt/live/wikimania-tickets.eventyay.com/fullchain.pem; 25 | ssl_certificate_key /etc/letsencrypt/live/wikimania-tickets.eventyay.com/privkey.pem; 26 | ssl_trusted_certificate /etc/letsencrypt/live/wikimania-tickets.eventyay.com/chain.pem; 27 | ssl_dhparam /etc/letsencrypt/dhparams/dhparam.pem; 28 | 29 | } 30 | 31 | -------------------------------------------------------------------------------- /config/talk/pretalx.cfg: -------------------------------------------------------------------------------- 1 | [filesystem] 2 | data = /data 3 | media = /data/media 4 | logs = /data/logs 5 | 6 | [site] 7 | ; never run debug in production 8 | debug = False 9 | url = https://app.eventyay.com 10 | csp_form = https://app.eventyay.com 11 | csp = https://app.eventyay.com 12 | secret=CHANGEME 13 | base_path = /talk 14 | static = /talk/static/ 15 | media = /talk/media/ 16 | 17 | [database] 18 | backend = postgresql 19 | name = ey_talk_db 20 | user = CHANGEME_eyadmin 21 | password = CHANGEME_eypass 22 | host = eventyay-postgres 23 | port = 5432 24 | 25 | [mail] 26 | from = info@eventyay.com 27 | host = mail.your-server.de 28 | port = 587 29 | user = info@eventyay.com 30 | password = CHANGEME 31 | tls = True 32 | ssl = False 33 | 34 | [celery] 35 | backend = redis://eventyay-redis/1 36 | broker = redis://eventyay-redis/2 37 | 38 | [redis] 39 | location=redis://eventyay-redis/0 40 | ; Remove the following line if you are unsure about your redis' security 41 | ; to reduce impact if redis gets compromised. 42 | sessions=true 43 | 44 | [urls] 45 | eventyay-ticket=https://app.eventyay.com/tickets/ 46 | eventyay-video=https://app.eventyay.com/video/ 47 | 48 | [sso] 49 | client_id=CHANGEME 50 | client_secret=CHANGEME 51 | -------------------------------------------------------------------------------- /local-setup/pretalx.cfg: -------------------------------------------------------------------------------- 1 | [filesystem] 2 | data = ../../data/talk/data 3 | media = ../../data/talk/data/media 4 | logs = ../../data/talk/data/logs 5 | 6 | [site] 7 | ; never run debug in production 8 | debug = False 9 | url = https://eventyay.localnet 10 | csp_form = https://eventyay.localnet 11 | csp = https://eventyay.localnet 12 | secret=CHANGEME 13 | base_path = /talk 14 | static = /talk/static/ 15 | media = /talk/media/ 16 | 17 | [database] 18 | backend = postgresql 19 | name = ey_talk_db 20 | user = CHANGEME_eyadmin 21 | password = CHANGEME_eypass 22 | host = eventyay.localnet 23 | port = 5432 24 | 25 | [mail] 26 | from = me@you.com 27 | host = mail.your-server.de 28 | port = 587 29 | user = me@you.com 30 | password = CHANGEME 31 | tls = True 32 | ssl = False 33 | 34 | [celery] 35 | backend = redis://eventyay.localnet:6379/1 36 | broker = redis://eventyay.localnet:6379/2 37 | 38 | [redis] 39 | location=redis://eventyay.localnet:6379/0 40 | ; Remove the following line if you are unsure about your redis' security 41 | ; to reduce impact if redis gets compromised. 42 | sessions=true 43 | 44 | [urls] 45 | eventyay-ticket=https://eventyay.localnet/tickets/ 46 | eventyay-video=https://eventyay.localnet/video/ 47 | 48 | [sso] 49 | client_id=CHANGEME 50 | client_secret=CHANGEME 51 | -------------------------------------------------------------------------------- /local-setup/setup.txt: -------------------------------------------------------------------------------- 1 | 2 | /etc/hosts setup 3 | --------------- 4 | add an entry 5 | 127.0.0.1 eventyay.localnet 6 | to your /etc/hosts (on linux, no idea about other OSs) 7 | 8 | 9 | 10 | TICKET_PORT=8455 11 | TALK_PORT=8355 12 | VIDEO_PORT=8375 13 | VIDEO_WEBAPP_PORT=8002 14 | 15 | start nginx & postgres & redis x2 16 | ---------- 17 | docker compose up -d 18 | 19 | ticket 20 | ----- 21 | pyenv virtualenv 3.11 ticket-local 22 | pyenv local ticket-local 23 | pip install -U pip in all 24 | pip3 install -e ".[dev]" 25 | cd src && ln -s ../../pretix.cfg . 26 | cd src && python manage.py collectstatic --noinput 27 | cd src && python manage.py migrate 28 | cd src && make npminstall 29 | cd src && python manage.py createsuperuser 30 | # remember user/pass !!! 31 | cd src && python manage.py runserver $TICKET_PORT 32 | 33 | talk 34 | ---- 35 | # in a different shell 36 | pyenv virtualenv 3.11 talk-local 37 | pyenv local talk-local 38 | pip install -U pip in all 39 | export UV_NO_MANAGED_PYTHON=1 40 | uv sync --active 41 | cd src && ln -s ../../pretalx.cfg . 42 | cd src && python manage.py collectstatic --noinput 43 | cd src && python manage.py migrate 44 | cd src && python manage.py init 45 | # use same user/pass 46 | cd src && python manage.py runserver $TALK_PORT 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /config/nginx/user_conf/eventyay-video.conf: -------------------------------------------------------------------------------- 1 | # Primary HTTPS Server (Port 443) 2 | server { 3 | server_name video.eventyay.com, wikimania-live.eventyay.com; 4 | 5 | listen 443 ssl; 6 | listen [::]:443 ssl; 7 | ssl_certificate /etc/letsencrypt/live/wikimania-live.eventyay.com/fullchain.pem; 8 | ssl_certificate_key /etc/letsencrypt/live/wikimania-live.eventyay.com/privkey.pem; 9 | ssl_trusted_certificate /etc/letsencrypt/live/wikimania-live.eventyay.com/chain.pem; 10 | ssl_dhparam /etc/letsencrypt/dhparams/dhparam.pem; 11 | 12 | # Location block for root path 13 | location / { 14 | return 301 https://app.eventyay.com/video$request_uri; # Redirecting to a new path 15 | } 16 | 17 | } 18 | 19 | server { 20 | server_name video.eventyay.com, wikimania-live.eventyay.com; 21 | 22 | listen 8443 ssl; 23 | listen [::]:8443 ssl; 24 | ssl_certificate /etc/letsencrypt/live/wikimania-live.eventyay.com/fullchain.pem; 25 | ssl_certificate_key /etc/letsencrypt/live/wikimania-live.eventyay.com/privkey.pem; 26 | ssl_trusted_certificate /etc/letsencrypt/live/wikimania-live.eventyay.com/chain.pem; 27 | ssl_dhparam /etc/letsencrypt/dhparams/dhparam.pem; 28 | 29 | # Location block for /server/ path 30 | location / { 31 | return 301 https://app.eventyay.com:8443/video$request_uri; # Redirecting to a new path 32 | } 33 | } 34 | 35 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | Setup of EventYay via docker compose 2 | ==================================== 3 | 4 | add the following entries to your /etc/hosts file, or 5 | change all the hostnames in various config files in docker-compose.yaml 6 | and config/** 7 | 127.0.0.1 app.eventyay.com 8 | 127.0.0.1 video.eventyay.com 9 | 10 | create an .env file, example is .env.example which currently contains 11 | POSTGRES_USER=CHANGEME_eyadmin 12 | POSTGRES_PASSWORD=CHANGEME_eypass 13 | VOLUMES_DIR=./data 14 | CONFIG_DIR=./config 15 | 16 | create the VOLUMES_DIR 17 | 18 | create 19 | data/talk/data 20 | data/ticket/data 21 | data/video/data 22 | data/video-webapp/public 23 | and make them 0777 (ugo+rwx !!!) 24 | 25 | 26 | run 27 | docker compose up -d 28 | 29 | wait and watch 30 | docker compose logs -f 31 | 32 | 33 | when the building of all files settled: 34 | 35 | log into eventyay-ticket and make initial setup 36 | docker exec -ti eventyay-ticket bash 37 | 38 | > cd 39 | > pretix createsuperuser 40 | 41 | this creates also the talk superuser!!! 42 | 43 | DO NOT ACCESS THE WEB PAGES BY NOW !!!! 44 | 45 | log into eventyay-talk and make initial setup 46 | docker exec -ti eventyay-talk bash 47 | 48 | > cd 49 | > pretalx init 50 | 51 | and use the same email and password as in pretix!!!! 52 | 53 | 54 | After that: 55 | * log into tickets 56 | * create SSO OAUTH key under Admin -> SSO Key for the correct domain 57 | * save client id and secret to pretalx.cfg 58 | 59 | Start from scratch 60 | * the redis volumes need to be removed 61 | maybe only necessary when changing server name 62 | * always do first the superuser setup as laid out above 63 | 64 | 65 | 66 | no idea what needs to be done for eventyay-video 67 | 68 | 69 | -------------------------------------------------------------------------------- /config/ticket/pretix.cfg: -------------------------------------------------------------------------------- 1 | [pretix] 2 | instance_name=eventyay 3 | url=https://app.eventyay.com/tickets 4 | currency=USD 5 | ; DO NOT change the following value, it has to be set to the location of the 6 | ; directory *inside* the docker container 7 | datadir=/data 8 | trust_x_forwarded_for=on 9 | trust_x_forwarded_proto=on 10 | registration=on 11 | talk_hostname=https://app.eventyay.com/talk/ 12 | video_server_hostname=https://app.eventyay.com:8443 13 | base_path=/tickets 14 | 15 | [urls] 16 | static=/tickets/static/ 17 | media=/tickets/media/ 18 | 19 | [locale] 20 | default=en 21 | # The following doesn't really work: 22 | #timezone=America/Denver 23 | # because (??) the machines run on UTC time and with this setting 24 | # celery communication has a time difference, giving: 25 | # eventyay-tickets | [2024-06-08 22:21:15,313: WARNING/MainProcess] Substantial drift from celery@5f47a4113906 may mean clocks are out of sync. Current drift is 21600 seconds. [orig: 2024-06-08 22:21:15.313012 recv: 2024-06-09 04:21:15.310646] 26 | # which is 6h difference which seems to be the diff between Denver and UTC 27 | timezone=UTC 28 | 29 | [database] 30 | backend = postgresql 31 | name = ey_ticket_db 32 | user = CHANGEME_eyadmin 33 | password = CHANGEME_eypass 34 | host = eventyay-postgres 35 | port = 5432 36 | 37 | [mail] 38 | from = info@eventyay.com 39 | host = mail.your-server.de 40 | port = 587 41 | user = info@eventyay.com 42 | password = CHANGEME 43 | tls = True 44 | ssl = False 45 | 46 | # redis stream: 47 | # 0 and 1 and 2 are used by eventyay-talk 48 | [redis] 49 | location=redis://eventyay-redis/3 50 | ; Remove the following line if you are unsure about your redis' security 51 | ; to reduce impact if redis gets compromised. 52 | sessions=true 53 | 54 | [celery] 55 | backend=redis://eventyay-redis/4 56 | broker=redis://eventyay-redis/5 57 | 58 | [django] 59 | secret=CHANGEME 60 | -------------------------------------------------------------------------------- /local-setup/pretix.cfg: -------------------------------------------------------------------------------- 1 | [pretix] 2 | instance_name=eventyay 3 | url=https://eventyay.localnet/tickets 4 | currency=USD 5 | ; DO NOT change the following value, it has to be set to the location of the 6 | ; directory *inside* the docker container 7 | datadir=../../data/ticket/data 8 | trust_x_forwarded_for=on 9 | trust_x_forwarded_proto=on 10 | registration=on 11 | talk_hostname=https://eventyay.localnet/talk/ 12 | video_server_hostname=https://eventyay.localnet:8443 13 | base_path=/tickets 14 | 15 | [urls] 16 | static=/tickets/static/ 17 | media=/tickets/media/ 18 | 19 | 20 | [locale] 21 | default=en 22 | # The following doesn't really work: 23 | #timezone=America/Denver 24 | # because (??) the machines run on UTC time and with this setting 25 | # celery communication has a time difference, giving: 26 | # eventyay-tickets | [2024-06-08 22:21:15,313: WARNING/MainProcess] Substantial drift from celery@5f47a4113906 may mean clocks are out of sync. Current drift is 21600 seconds. [orig: 2024-06-08 22:21:15.313012 recv: 2024-06-09 04:21:15.310646] 27 | # which is 6h difference which seems to be the diff between Denver and UTC 28 | timezone=UTC 29 | 30 | [database] 31 | backend = postgresql 32 | name = ey_ticket_db 33 | user = CHANGEME_eyadmin 34 | password = CHANGEME_eypass 35 | host = eventyay.localnet 36 | port = 5432 37 | 38 | [mail] 39 | from = me@you.com 40 | host = mail.your-server.de 41 | port = 587 42 | user = me@you.com 43 | password = CHANGEME 44 | tls = True 45 | ssl = False 46 | 47 | # redis stream: 48 | # 0 and 1 and 2 are used by eventyay-talk 49 | [redis] 50 | location=redis://eventyay.localnet:6379/3 51 | ; Remove the following line if you are unsure about your redis' security 52 | ; to reduce impact if redis gets compromised. 53 | sessions=true 54 | 55 | [celery] 56 | backend=redis://eventyay.localnet:6379/4 57 | broker=redis://eventyay.localnet:6379/5 58 | 59 | [django] 60 | secret=lalala_we_are_so_nice_1969_!? 61 | -------------------------------------------------------------------------------- /archive/pretix.cfg: -------------------------------------------------------------------------------- 1 | [pretix] 2 | instance_name=eventyay-tickets 3 | url=http://localhost 4 | currency=USD 5 | ; DO NOT change the following value, it has to be set to the location of the 6 | ; directory *inside* the docker container 7 | datadir=/data 8 | trust_x_forwarded_for=on 9 | trust_x_forwarded_proto=on 10 | registration=on 11 | 12 | [locale] 13 | default=en 14 | # The following doesn't really work: 15 | #timezone=America/Denver 16 | # because (??) the machines run on UTC time and with this setting 17 | # celery communication has a time difference, giving: 18 | # eventyay-tickets | [2024-06-08 22:21:15,313: WARNING/MainProcess] Substantial drift from celery@5f47a4113906 may mean clocks are out of sync. Current drift is 21600 seconds. [orig: 2024-06-08 22:21:15.313012 recv: 2024-06-09 04:21:15.310646] 19 | # which is 6h difference which seems to be the diff between Denver and UTC 20 | timezone=UTC 21 | 22 | [database] 23 | ; Replace postgresql with mysql for MySQL 24 | backend=postgresql 25 | name=eventyay_db 26 | user=postgres_db_user_changeme 27 | ; Replace with the password you chose above 28 | password=postgres_db_pwd_changeme 29 | ; In most docker setups, 172.17.0.1 is the address of the docker host. Adjust 30 | ; this to wherever your database is running, e.g. the name of a linked container 31 | ; or of a mounted MySQL socket. 32 | ; host=172.17.0.1 33 | host=db 34 | port=5432 35 | 36 | [mail] 37 | ; See config file documentation for more options 38 | from=user@mailserver.org 39 | ; This is the default IP address of your docker host in docker's virtual 40 | ; network. Make sure postfix listens on this address. 41 | host=172.17.0.1 42 | ; user=USERNAME 43 | ; password=FOOBAR 44 | ; port=587 45 | ; tls=on 46 | ; ssl=off 47 | 48 | [redis] 49 | location=redis://redis/0 50 | ; Remove the following line if you are unsure about your redis' security 51 | ; to reduce impact if redis gets compromised. 52 | sessions=true 53 | 54 | [celery] 55 | backend=redis://redis/1 56 | broker=redis://redis/2 57 | -------------------------------------------------------------------------------- /archive/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | services: 3 | pretalx: 4 | image: eventyay/eventyay-talk:development 5 | container_name: eventyay-talk 6 | restart: unless-stopped 7 | depends_on: 8 | redis: 9 | condition: service_healthy 10 | db: 11 | condition: service_healthy 12 | environment: 13 | PRETALX_FILESYSTEM_MEDIA: /public/media 14 | PRETALX_FILESYSTEM_STATIC: /public/static 15 | volumes: 16 | - ./pretalx.cfg:/etc/pretalx/pretalx.cfg:ro 17 | - pretalx-data:/data 18 | - pretalx-public:/public 19 | ports: 20 | - "127.0.0.1:8355:80" 21 | 22 | pretix: 23 | image: eventyay/eventyay-tickets:development 24 | container_name: eventyay-tickets 25 | restart: unless-stopped 26 | depends_on: 27 | db: 28 | condition: service_healthy 29 | redis: 30 | condition: service_healthy 31 | ports: 32 | - "127.0.0.1:8455:80" 33 | volumes: 34 | - ./pretix.cfg:/etc/pretix/pretix.cfg:ro 35 | - pretix-data:/data 36 | - pretix-src:/pretix/src 37 | 38 | db: 39 | image: postgis/postgis:12-2.5-alpine 40 | container_name: db 41 | restart: unless-stopped 42 | volumes: 43 | - db:/var/lib/postgresql/data 44 | environment: 45 | POSTGRES_USER: postgres_db_user_changeme 46 | POSTGRES_PASSWORD: postgres_db_pwd_changeme 47 | POSTGRES_DB: eventyay_db 48 | healthcheck: # TODO why can we not use $POSTGRES_USER and $POSTGRES_DB here, since it is in the env? 49 | test: ["CMD-SHELL", 'pg_isready -U postgres_db_user_changeme -d eventyay_db'] 50 | interval: 10s 51 | timeout: 5s 52 | retries: 5 53 | 54 | redis: 55 | image: redis:latest 56 | container_name: pretalx-redis 57 | restart: unless-stopped 58 | volumes: 59 | - pretalx-redis:/data 60 | healthcheck: 61 | test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ] 62 | 63 | volumes: 64 | db: 65 | pretalx-data: 66 | pretalx-public: 67 | pretalx-redis: 68 | pretix-data: 69 | pretix-src: 70 | -------------------------------------------------------------------------------- /local-setup/docker-compose.yml: -------------------------------------------------------------------------------- 1 | name: eventyay 2 | 3 | services: 4 | postgres: 5 | image: postgis/postgis:15-3.5 6 | container_name: eventyay-postgres 7 | restart: unless-stopped 8 | network_mode: host 9 | volumes: 10 | - ${VOLUMES_DIR}/postgres/data:/var/lib/postgresql/data 11 | - ${CONFIG_DIR}/postgres/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d 12 | environment: 13 | # the following where in the original eventyay-video docker-compose.yaml 14 | # but I am not sure why they are necessary 15 | # POSTGRES_INITDB_ARGS: --auth-host=md5 16 | # POSTGRES_HOST_AUTH_METHOD: md5 17 | POSTGRES_USER: ${POSTGRES_USER} 18 | POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} 19 | POSTGRES_MULTIPLE_DATABASES: ey_ticket_db,ey_talk_db,ey_video_db 20 | healthcheck: 21 | test: ["CMD-SHELL", 'pg_isready -U ${POSTGRES_USER} -d ey_talk_db'] 22 | interval: 10s 23 | timeout: 5s 24 | retries: 5 25 | 26 | redis: 27 | image: redis:latest 28 | container_name: eventyay-redis 29 | restart: unless-stopped 30 | network_mode: host 31 | command: --port 6379 32 | volumes: 33 | - rd:/data 34 | healthcheck: 35 | test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ] 36 | 37 | # eventyay-video uses two different redis servers, the first is 38 | # for celery, while the second for whatever 39 | redis1: 40 | image: redis:latest 41 | container_name: eventyay-redis1 42 | restart: unless-stopped 43 | network_mode: host 44 | command: --port 6380 45 | volumes: 46 | - rd1:/data 47 | healthcheck: 48 | test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ] 49 | 50 | nginx: # this is nginx + certbot, see https://github.com/JonasAlfredsson/docker-nginx-certbot 51 | restart: always 52 | image: jonasal/nginx-certbot:latest 53 | container_name: eventyay-nginx 54 | network_mode: host 55 | volumes: 56 | - ${CONFIG_DIR}/nginx/letsencrypt:/etc/letsencrypt 57 | - ${CONFIG_DIR}/nginx/user_conf/:/etc/nginx/user_conf.d/:ro 58 | - ${VOLUMES_DIR}/talk/data:/talk-data 59 | - ${VOLUMES_DIR}/ticket/data:/ticket-data 60 | env_file: 61 | - ${CONFIG_DIR}/nginx/nginx-certbot.env 62 | environment: # only those overriding the defaults in the nginx-certbot.env above 63 | - CERTBOT_EMAIL=some@email.org 64 | # - CERTBOT_AUTHENTICATOR=dns-cloudflare 65 | # make sure we run against local auto-generated CA 66 | - USE_LOCAL_CA=1 67 | 68 | # volumes for redis that can be dropped and don't need moving 69 | volumes: 70 | rd: 71 | rd1: 72 | -------------------------------------------------------------------------------- /config/nginx/user_conf/eventyay-app.conf: -------------------------------------------------------------------------------- 1 | server { 2 | server_name app.eventyay.com; 3 | 4 | # Root location 5 | location / { 6 | proxy_pass http://eventyay-ticket/common/; 7 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 8 | proxy_set_header X-Forwarded-Proto $scheme; # Use $scheme to dynamically set the protocol 9 | proxy_set_header Host $host; # Use $host to dynamically set the host 10 | } 11 | location /video/admin { 12 | return 301 https://app.eventyay.com:8443/control; 13 | } 14 | location /common/ { 15 | proxy_pass http://eventyay-ticket/common/; 16 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 17 | proxy_set_header X-Forwarded-Proto $scheme; # Use $scheme to dynamically set the protocol 18 | proxy_set_header Host $host; # Use $host to dynamically set the host 19 | } 20 | location /talk/media/ { 21 | rewrite ^/talk/media/(.*)$ /media/$1 break; 22 | root /talk-data; 23 | } 24 | 25 | 26 | location /talk/static/ { 27 | #proxy_pass http://eventyay-talk/talk/static/; 28 | proxy_pass http://eventyay-talk/static/; 29 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 30 | proxy_set_header X-Forwarded-Proto $scheme; 31 | proxy_set_header Host $host; 32 | } 33 | location /static/ { 34 | #proxy_pass http://eventyay-talk/talk/static/; 35 | proxy_pass http://eventyay-talk/static/; 36 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 37 | proxy_set_header X-Forwarded-Proto $scheme; 38 | proxy_set_header Host $host; 39 | } 40 | 41 | # Talk location 42 | location /talk/ { 43 | proxy_pass http://eventyay-talk/; 44 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 45 | proxy_set_header X-Forwarded-Proto $scheme; 46 | proxy_set_header Host $host; 47 | } 48 | 49 | # Tickets location 50 | location /tickets/ { 51 | proxy_pass http://eventyay-ticket/; 52 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 53 | proxy_set_header X-Forwarded-Proto $scheme; 54 | proxy_set_header Host $host; 55 | } 56 | 57 | location /video/ { 58 | proxy_pass http://eventyay-video-webapp:8880/video/; 59 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 60 | proxy_set_header X-Forwarded-Proto https; 61 | proxy_http_version 1.1; 62 | proxy_set_header Upgrade $http_upgrade; 63 | proxy_set_header Connection 'upgrade'; 64 | proxy_set_header Host $http_host; 65 | proxy_cache_bypass $http_upgrade; 66 | } 67 | 68 | 69 | listen 443 ssl default_server reuseport; 70 | listen [::]:443 ssl default_server reuseport; 71 | ssl_certificate /etc/letsencrypt/live/app.eventyay.com/fullchain.pem; 72 | ssl_certificate_key /etc/letsencrypt/live/app.eventyay.com/privkey.pem; 73 | ssl_trusted_certificate /etc/letsencrypt/live/app.eventyay.com/chain.pem; 74 | ssl_dhparam /etc/letsencrypt/dhparams/dhparam.pem; 75 | } 76 | 77 | 78 | server { 79 | listen 8443 ssl; # Listening on port 8443 for SSL traffic 80 | listen [::]:8443 ssl default_server reuseport; 81 | server_name app.eventyay.com; # Ensure this matches your domain 82 | 83 | ssl_certificate /etc/letsencrypt/live/app.eventyay.com/fullchain.pem; 84 | ssl_certificate_key /etc/letsencrypt/live/app.eventyay.com/privkey.pem; 85 | ssl_trusted_certificate /etc/letsencrypt/live/app.eventyay.com/chain.pem; 86 | ssl_dhparam /etc/letsencrypt/dhparams/dhparam.pem; 87 | 88 | 89 | # Location block for /video/ path 90 | location / { 91 | proxy_pass http://eventyay-video/; # Proxying to 8375 92 | proxy_http_version 1.1; 93 | proxy_set_header Upgrade $http_upgrade; 94 | proxy_set_header Connection "upgrade"; 95 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 96 | proxy_set_header X-Forwarded-Proto https; 97 | proxy_set_header Host $http_host; 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /local-setup/config/nginx/user_conf/eventyay-app.conf: -------------------------------------------------------------------------------- 1 | server { 2 | server_name eventyay.localnet; 3 | 4 | # Root location 5 | location / { 6 | proxy_pass http://eventyay.localnet:8455/common/; 7 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 8 | proxy_set_header X-Forwarded-Proto $scheme; # Use $scheme to dynamically set the protocol 9 | proxy_set_header Host $host; # Use $host to dynamically set the host 10 | } 11 | location /video/admin { 12 | return 301 https://eventyay.localnet:8443/control; 13 | } 14 | location /common/ { 15 | proxy_pass http://eventyay.localnet:8455/common/; 16 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 17 | proxy_set_header X-Forwarded-Proto $scheme; # Use $scheme to dynamically set the protocol 18 | proxy_set_header Host $host; # Use $host to dynamically set the host 19 | } 20 | location /talk/media/ { 21 | rewrite ^/talk/media/(.*)$ /media/$1 break; 22 | root /talk-data; 23 | } 24 | 25 | 26 | location /talk/static/ { 27 | #proxy_pass http://eventyay.localnet:8355/talk/static/; 28 | proxy_pass http://eventyay.localnet:8355/static/; 29 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 30 | proxy_set_header X-Forwarded-Proto $scheme; 31 | proxy_set_header Host $host; 32 | } 33 | location /static/ { 34 | #proxy_pass http://eventyay.localnet:8355/talk/static/; 35 | proxy_pass http://eventyay.localnet:8355/static/; 36 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 37 | proxy_set_header X-Forwarded-Proto $scheme; 38 | proxy_set_header Host $host; 39 | } 40 | 41 | # Talk location 42 | location /talk/ { 43 | proxy_pass http://eventyay.localnet:8355/; 44 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 45 | proxy_set_header X-Forwarded-Proto $scheme; 46 | proxy_set_header Host $host; 47 | } 48 | 49 | # Tickets location 50 | location /tickets/ { 51 | proxy_pass http://eventyay.localnet:8455/; 52 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 53 | proxy_set_header X-Forwarded-Proto $scheme; 54 | proxy_set_header Host $host; 55 | } 56 | 57 | location /video/ { 58 | proxy_pass http://eventyay.localnet:8002/video/; 59 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 60 | proxy_set_header X-Forwarded-Proto https; 61 | proxy_http_version 1.1; 62 | proxy_set_header Upgrade $http_upgrade; 63 | proxy_set_header Connection 'upgrade'; 64 | proxy_set_header Host $http_host; 65 | proxy_cache_bypass $http_upgrade; 66 | } 67 | 68 | 69 | listen 443 ssl default_server reuseport; 70 | listen [::]:443 ssl default_server reuseport; 71 | ssl_certificate /etc/letsencrypt/live/eventyay.localnet/fullchain.pem; 72 | ssl_certificate_key /etc/letsencrypt/live/eventyay.localnet/privkey.pem; 73 | ssl_trusted_certificate /etc/letsencrypt/live/eventyay.localnet/chain.pem; 74 | ssl_dhparam /etc/letsencrypt/dhparams/dhparam.pem; 75 | } 76 | 77 | 78 | server { 79 | listen 8443 ssl; # Listening on port 8443 for SSL traffic 80 | listen [::]:8443 ssl default_server reuseport; 81 | server_name eventyay.localnet; # Ensure this matches your domain 82 | 83 | ssl_certificate /etc/letsencrypt/live/eventyay.localnet/fullchain.pem; 84 | ssl_certificate_key /etc/letsencrypt/live/eventyay.localnet/privkey.pem; 85 | ssl_trusted_certificate /etc/letsencrypt/live/eventyay.localnet/chain.pem; 86 | ssl_dhparam /etc/letsencrypt/dhparams/dhparam.pem; 87 | 88 | 89 | # Location block for /video/ path 90 | location / { 91 | proxy_pass http://eventyay.localnet:8375/; # Proxying to 8375 92 | proxy_http_version 1.1; 93 | proxy_set_header Upgrade $http_upgrade; 94 | proxy_set_header Connection "upgrade"; 95 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 96 | proxy_set_header X-Forwarded-Proto https; 97 | proxy_set_header Host $http_host; 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | name: eventyay 2 | 3 | services: 4 | 5 | talk: 6 | image: eventyay/eventyay-talk:main 7 | container_name: eventyay-talk 8 | restart: unless-stopped 9 | depends_on: 10 | - postgres 11 | - redis 12 | volumes: 13 | - ${CONFIG_DIR}/talk/pretalx.cfg:/etc/pretalx/pretalx.cfg:ro 14 | - ${VOLUMES_DIR}/talk/data:/data 15 | ports: 16 | - "8355:80" 17 | 18 | ticket: 19 | image: eventyay/eventyay-ticket:master 20 | container_name: eventyay-ticket 21 | restart: unless-stopped 22 | depends_on: 23 | - postgres 24 | - redis 25 | ports: 26 | - "8455:80" 27 | volumes: 28 | - ${CONFIG_DIR}/ticket/pretix.cfg:/etc/pretix/pretix.cfg:ro 29 | - ${VOLUMES_DIR}/ticket/data:/data 30 | 31 | video: 32 | image: eventyay/eventyay-video:main 33 | container_name: eventyay-video 34 | ports: 35 | - "8375:80" 36 | environment: 37 | - DJANGO_SETTINGS_MODULE=venueless.settings 38 | - LC_ALL=C.UTF-8 39 | - IPYTHONDIR=/data/.ipython 40 | - VENUELESS_REDIS_URLS=redis://redis/6,redis://redis1/0 41 | - VENUELESS_DATA_DIR=/data 42 | - VENUELESS_REDIS_USE_PUBSUB=true 43 | depends_on: 44 | - postgres 45 | - redis 46 | - redis1 47 | volumes: 48 | - ${CONFIG_DIR}/video/venueless.cfg:/etc/venueless/venueless.cfg:ro 49 | - ${VOLUMES_DIR}/video/data:/data 50 | entrypoint: ["/usr/local/bin/venueless"] 51 | command: ["all"] 52 | 53 | video-webapp: 54 | image: eventyay/eventyay-video:main 55 | container_name: eventyay-video-webapp 56 | ports: 57 | - "8002:8880" 58 | environment: 59 | - NODE_OPTIONS=--openssl-legacy-provider 60 | entrypoint: [""] 61 | volumes: 62 | - ${VOLUMES_DIR}/video-webapp/public:/public 63 | command: ["npm", "start", "--", "--host", "0.0.0.0"] 64 | working_dir: /venueless/webapp 65 | 66 | 67 | postgres: 68 | image: postgis/postgis:15-3.5 69 | container_name: eventyay-postgres 70 | restart: unless-stopped 71 | volumes: 72 | - ${VOLUMES_DIR}/postgres/data:/var/lib/postgresql/data 73 | - ${CONFIG_DIR}/postgres/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d 74 | environment: 75 | # the following where in the original eventyay-video docker-compose.yaml 76 | # but I am not sure why they are necessary 77 | # POSTGRES_INITDB_ARGS: --auth-host=md5 78 | # POSTGRES_HOST_AUTH_METHOD: md5 79 | POSTGRES_USER: ${POSTGRES_USER} 80 | POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} 81 | POSTGRES_MULTIPLE_DATABASES: ey_ticket_db,ey_talk_db,ey_video_db 82 | healthcheck: 83 | test: ["CMD-SHELL", 'pg_isready -U ${POSTGRES_USER} -d ey_talk_db'] 84 | interval: 10s 85 | timeout: 5s 86 | retries: 5 87 | 88 | redis: 89 | image: redis:latest 90 | container_name: eventyay-redis 91 | restart: unless-stopped 92 | volumes: 93 | - rd:/data 94 | healthcheck: 95 | test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ] 96 | 97 | # eventyay-video uses two different redis servers, the first is 98 | # for celery, while the second for whatever 99 | redis1: 100 | image: redis:latest 101 | container_name: eventyay-redis1 102 | restart: unless-stopped 103 | volumes: 104 | - rd1:/data 105 | healthcheck: 106 | test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ] 107 | 108 | nginx: # this is nginx + certbot, see https://github.com/JonasAlfredsson/docker-nginx-certbot 109 | restart: always 110 | image: jonasal/nginx-certbot:latest 111 | container_name: eventyay-nginx 112 | ports: 113 | - 80:80 114 | - 443:443 115 | - 8443:8443 116 | volumes: 117 | - ${CONFIG_DIR}/nginx/letsencrypt:/etc/letsencrypt 118 | - ${CONFIG_DIR}/nginx/user_conf/:/etc/nginx/user_conf.d/:ro 119 | - ${VOLUMES_DIR}/talk/data:/talk-data 120 | - ${VOLUMES_DIR}/ticket/data:/ticket-data 121 | env_file: 122 | - ${CONFIG_DIR}/nginx/nginx-certbot.env 123 | environment: # only those overriding the defaults in the nginx-certbot.env above 124 | - CERTBOT_EMAIL=norbert@preining.info 125 | # - CERTBOT_AUTHENTICATOR=dns-cloudflare 126 | # make sure we run against local auto-generated CA 127 | - USE_LOCAL_CA=1 128 | depends_on: 129 | - talk 130 | - ticket 131 | - video 132 | - video-webapp 133 | 134 | watchtower: 135 | image: containrrr/watchtower 136 | container_name: eventyay-watchtower 137 | volumes: 138 | - /var/run/docker.sock:/var/run/docker.sock 139 | restart: always 140 | environment: 141 | WATCHTOWER_NOTIFICATIONS: 'shoutrrr' 142 | WATCHTOWER_NOTIFICATION_URL: ${WATCHTOWER_NOTIFICATION_URL} 143 | command: watchtower eventyay-talk eventyay-ticket eventyay-video eventyay-video-webapp --cleanup --interval 600 144 | 145 | # volumes for redis that can be dropped and don't need moving 146 | volumes: 147 | rd: 148 | rd1: 149 | -------------------------------------------------------------------------------- /docker-compose-dev.yml: -------------------------------------------------------------------------------- 1 | name: eventyay 2 | 3 | services: 4 | 5 | talk: 6 | image: eventyay/eventyay-talk:local 7 | platform: linux/amd64 8 | container_name: eventyay-talk 9 | restart: unless-stopped 10 | command: devel # this translates to calling `pretalx devel` for startup 11 | environment: 12 | - GUNICORN_WORKERS=2 13 | depends_on: 14 | - postgres 15 | - redis 16 | volumes: 17 | - ${CONFIG_DIR}/talk/pretalx.cfg:/etc/pretalx/pretalx.cfg:ro 18 | - ${VOLUMES_DIR}/talk/data:/data 19 | - ${EVENTYAY_TALK_REPO}:/pretalx 20 | ports: 21 | - "8355:80" 22 | 23 | ticket: 24 | image: eventyay/eventyay-ticket:local 25 | platform: linux/amd64 26 | container_name: eventyay-ticket 27 | restart: unless-stopped 28 | command: devel # this translates to calling `pretix devel` for startup 29 | depends_on: 30 | - postgres 31 | - redis 32 | ports: 33 | - "8455:80" 34 | environment: 35 | - NUM_WORKERS=2 36 | volumes: 37 | - ${CONFIG_DIR}/ticket/pretix.cfg:/etc/pretix/pretix.cfg:ro 38 | - ${VOLUMES_DIR}/ticket/data:/data 39 | - ${EVENTYAY_TICKET_REPO}:/pretix 40 | - ${EVENTYAY_TICKET_REPO}/deployment/docker/production_settings.py:/pretix/src/production_settings.py 41 | 42 | video: 43 | image: eventyay/eventyay-video:local 44 | platform: linux/amd64 45 | container_name: eventyay-video 46 | ports: 47 | - "8375:80" 48 | environment: 49 | - DJANGO_SETTINGS_MODULE=venueless.settings 50 | - LC_ALL=C.UTF-8 51 | - IPYTHONDIR=/data/.ipython 52 | - VENUELESS_REDIS_URLS=redis://redis/6,redis://redis1/0 53 | - VENUELESS_DATA_DIR=/data 54 | - VENUELESS_REDIS_USE_PUBSUB=true 55 | - VENUELESS_WORKERS=2 56 | depends_on: 57 | - postgres 58 | - redis 59 | - redis1 60 | volumes: 61 | - ${CONFIG_DIR}/video/venueless.cfg:/etc/venueless/venueless.cfg:ro 62 | - ${VOLUMES_DIR}/video/data:/data 63 | - ${EVENTYAY_VIDEO_REPO}:/venueless 64 | entrypoint: ["/usr/local/bin/venueless"] 65 | command: ["devel"] # this translates to calling `pretix devel` for startup 66 | 67 | video-webapp: 68 | image: eventyay/eventyay-video:local 69 | platform: linux/amd64 70 | container_name: eventyay-video-webapp 71 | ports: 72 | - "8002:8880" 73 | environment: 74 | - NODE_OPTIONS=--openssl-legacy-provider 75 | - VENUELESS_WORKERS=2 76 | entrypoint: [""] 77 | volumes: 78 | - ${VOLUMES_DIR}/video-webapp/public:/public 79 | - ${EVENTYAY_VIDEO_REPO}:/venueless 80 | command: ["npm", "start", "--", "--host", "0.0.0.0"] 81 | working_dir: /venueless/webapp 82 | 83 | 84 | postgres: 85 | image: postgis/postgis:15-3.5 86 | platform: linux/amd64 87 | container_name: eventyay-postgres 88 | restart: unless-stopped 89 | volumes: 90 | - ${VOLUMES_DIR}/postgres/data:/var/lib/postgresql/data 91 | - ${CONFIG_DIR}/postgres/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d 92 | environment: 93 | # the following where in the original eventyay-video docker-compose.yaml 94 | # but I am not sure why they are necessary 95 | # POSTGRES_INITDB_ARGS: --auth-host=md5 96 | # POSTGRES_HOST_AUTH_METHOD: md5 97 | POSTGRES_USER: ${POSTGRES_USER} 98 | POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} 99 | POSTGRES_MULTIPLE_DATABASES: ey_ticket_db,ey_talk_db,ey_video_db 100 | healthcheck: 101 | test: ["CMD-SHELL", 'pg_isready -U ${POSTGRES_USER} -d ey_talk_db'] 102 | interval: 10s 103 | timeout: 5s 104 | retries: 5 105 | 106 | redis: 107 | image: redis:latest 108 | platform: linux/amd64 109 | container_name: eventyay-redis 110 | restart: unless-stopped 111 | volumes: 112 | - rd:/data 113 | healthcheck: 114 | test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ] 115 | 116 | # eventyay-video uses two different redis servers, the first is 117 | # for celery, while the second for whatever 118 | redis1: 119 | image: redis:latest 120 | platform: linux/amd64 121 | container_name: eventyay-redis1 122 | restart: unless-stopped 123 | volumes: 124 | - rd1:/data 125 | healthcheck: 126 | test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ] 127 | 128 | nginx: # this is nginx + certbot, see https://github.com/JonasAlfredsson/docker-nginx-certbot 129 | restart: always 130 | image: jonasal/nginx-certbot:latest 131 | platform: linux/amd64 132 | container_name: eventyay-nginx 133 | ports: 134 | - 80:80 135 | - 443:443 136 | - 8443:8443 137 | volumes: 138 | - ${CONFIG_DIR}/nginx/letsencrypt:/etc/letsencrypt 139 | - ${CONFIG_DIR}/nginx/user_conf/:/etc/nginx/user_conf.d/:ro 140 | - ${VOLUMES_DIR}/talk/data:/talk-data 141 | - ${VOLUMES_DIR}/ticket/data:/ticket-data 142 | env_file: 143 | - ${CONFIG_DIR}/nginx/nginx-certbot.env 144 | environment: # only those overriding the defaults in the nginx-certbot.env above 145 | - CERTBOT_EMAIL=norbert@preining.info 146 | # - CERTBOT_AUTHENTICATOR=dns-cloudflare 147 | # make sure we run against local auto-generated CA 148 | - USE_LOCAL_CA=1 149 | depends_on: 150 | - talk 151 | - ticket 152 | - video 153 | - video-webapp 154 | 155 | watchtower: 156 | image: containrrr/watchtower 157 | platform: linux/amd64 158 | container_name: eventyay-watchtower 159 | volumes: 160 | - /var/run/docker.sock:/var/run/docker.sock 161 | restart: always 162 | environment: 163 | WATCHTOWER_NOTIFICATIONS: 'shoutrrr' 164 | WATCHTOWER_NOTIFICATION_URL: ${WATCHTOWER_NOTIFICATION_URL} 165 | command: watchtower eventyay-talk eventyay-ticket eventyay-video eventyay-video-webapp --cleanup --interval 600 166 | 167 | # volumes for redis that can be dropped and don't need moving 168 | volumes: 169 | rd: 170 | rd1: 171 | -------------------------------------------------------------------------------- /README.development.md: -------------------------------------------------------------------------------- 1 | # Setting Up a Development Environment for EventYay Components 2 | 3 | This guide will help you set up the complete app.eventyay.com system locally for development using Docker. 4 | 5 | ## Prerequisites 6 | 7 | - Docker (May require installation if not already done)/Install Docker Desktop on MacOS enable rosetta translation in docker if on arm 8 | - Docker Compose 9 | - NPM/Node (May require installation if not already done) on MacOS you can install it with homebrew 10 | - git 11 | 12 | ## Video Tutorial 13 | 14 | For visual guidance, you can watch the EventYay Setup tutorial for FOSSASIA Summit 2025: 15 | [https://www.youtube.com/watch?v=w5pqJAnIG3M](https://www.youtube.com/watch?v=w5pqJAnIG3M) 16 | 17 | ## Initial Setup 18 | 19 | ### 1. Prepare Your Work Directory 20 | 21 | First, set up a work directory where all development will happen: 22 | 23 | ```bash 24 | # Define your work directory replace eventyay-dev with name of your preference 25 | export WORKDIR=~/eventyay-dev 26 | mkdir -p $WORKDIR 27 | cd $WORKDIR 28 | ``` 29 | 30 | > **Note on Environment:** For optimal performance, use Ubuntu 22.04 LTS or newer(Prefer LTS as some latest builds are causing some issue with docker) , or macOS. Windows Subsystem for Linux (WSL) may cause issues with Docker networking and file permissions. 31 | 32 | ### 2. Clone Repositories 33 | 34 | Clone all the required repositories: 35 | 36 | ```bash 37 | # Define GitHub paths 38 | FOSSASIA_GITHUB=https://github.com/fossasia 39 | PERSONAL_GITHUB=git@github.com: 40 | 41 | # Clone all FOSSASIA repos 42 | git clone $FOSSASIA_GITHUB/eventyay-docker 43 | git clone $FOSSASIA_GITHUB/eventyay-talk 44 | git clone $FOSSASIA_GITHUB/eventyay-tickets 45 | git clone $FOSSASIA_GITHUB/eventyay-video 46 | ``` 47 | 48 | > **Note:** Forking repositories is optional but recommended if you plan to contribute. If you've forked the repositories, you can add your personal clone as a remote: 49 | > 50 | > ```bash 51 | > # from the for loop you can remove repositories that you haven't forked for development 52 | > for repo in eventyay-talk eventyay-tickets eventyay-video eventyay-docker; do 53 | > cd $WORKDIR/$repo 54 | > git remote add personal $PERSONAL_GITHUB/$repo.git 55 | > git fetch personal 56 | > cd $WORKDIR 57 | > done 58 | > ``` 59 | 60 | All checked out repos (except eventyay-docker) should default to the `development` branch. For new development, check out a branch from the up-to-date `development` branch. 61 | 62 | ## Building and Configuration 63 | 64 | ### 1. Build Development-Oriented Images 65 | 66 | ```bash 67 | # From your $WORKDIR 68 | cd eventyay-talk && make local 69 | cd ../eventyay-tickets && make local 70 | cd ../eventyay-video && make local 71 | cd .. 72 | ``` 73 | 74 | ### 2. Set Up EventYay Video 75 | 76 | The video webapp needs node modules etc installed and build. 77 | This is done in during the docker image build step, but since 78 | we mount the checked out eventyay-video directory into the 79 | container, the built-in directory with node-modules etc is hidden. 80 | 81 | ```bash 82 | cd eventyay-video/webapp 83 | npm ci --legacy-peer-deps 84 | NODE_OPTIONS=--openssl-legacy-provider npm run build 85 | cd ../.. 86 | ``` 87 | 88 | ### 3. Create Data Directories 89 | 90 | Ensure you are inside the `eventyay-docker` directory: 91 | 92 | ```bash 93 | cd eventyay-docker 94 | ``` 95 | 96 | Create necessary data directories: 97 | *Timestamp: [15:51](https://youtu.be/w5pqJAnIG3M?si=1QOQw-tIhuPXBjlR&t=951)* 98 | 99 | ```bash 100 | mkdir -p data/{postgres,talk,ticket,video,video-webapp} 101 | mkdir -p data/{talk,ticket,video}/data 102 | mkdir -p data/video-webapp/public 103 | chown -R $(id -u):$(id -g) data/ 104 | ``` 105 | 106 | ### 4. Configure Environment Variables 107 | 108 | Create a `.env` file from the example if you don't need to make any changes to environment variables: 109 | 110 | ```bash 111 | cp .env.example .env 112 | ``` 113 | 114 | ### 5. Set Up Host Entries 115 | 116 | **->Add the following entries to your `/etc/hosts` file:** 117 | 118 | ``` 119 | grep -qxF "127.0.0.1 app.eventyay.com" /etc/hosts || echo "127.0.0.1 app.eventyay.com" | sudo tee -a /etc/hosts 120 | grep -qxF "127.0.0.1 video.eventyay.com" /etc/hosts || echo "127.0.0.1 video.eventyay.com" | sudo tee -a /etc/hosts 121 | ``` 122 | 123 | Alternatively, you can change all hostnames in the configuration files in `docker-compose.yaml` and `config/**`. 124 | 125 | **->WSL users should run an elevated command prompt in order to add entries to windows hosts:** 126 | 127 | ``` 128 | findstr /C:"127.0.0.1 app.eventyay.com" %SystemRoot%\System32\drivers\etc\hosts >nul 2>&1 && echo Already exists: app.eventyay.com || (echo 127.0.0.1 app.eventyay.com>>%SystemRoot%\System32\drivers\etc\hosts && echo Added: app.eventyay.com) 129 | 130 | findstr /C:"127.0.0.1 video.eventyay.com" %SystemRoot%\System32\drivers\etc\hosts >nul 2>&1 && echo Already exists: video.eventyay.com || (echo 127.0.0.1 video.eventyay.com>>%SystemRoot%\System32\drivers\etc\hosts && echo Added: video.eventyay.com) 131 | ``` 132 | 133 | **->WSL users can alternatively install chrome inside wsl which will show as a seperate browser in windows but there may be performance issues** 134 | 135 | ``` 136 | cd /tmp 137 | sudo wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb 138 | sudo dpkg -i google-chrome-stable_current_amd64.deb 139 | sudo apt install --fix-broken -y 140 | sudo dpkg -i google-chrome-stable_current_amd64.deb 141 | ``` 142 | 143 | Chrome in WSL can be accessed by (if installed inside WSL): 144 | ``` 145 | google-chrome app.eventyay.com 146 | ``` 147 | 148 | ## Launching the Application 149 | 150 | ### 1. Start the Containers 151 | 152 | ```bash 153 | docker compose -f docker-compose-dev.yml up -d 154 | ``` 155 | 156 | ### 2. Initial User Setup 157 | 158 | ⚠️ **Critical:** Use identical email address and password for both the pretix and pretalx superusers. The systems are integrated and rely on matching credentials. Avoid root access as it can cause configuration issues. 159 | 160 | ### Create ticket superuser in the eventyay-ticket container 161 | 162 | ```bash 163 | # Execute this command in your host terminal to enter the ticket container 164 | docker exec -ti eventyay-ticket bash 165 | ``` 166 | 167 | > Once inside the container, run: 168 | > 169 | > ```bash 170 | > # Create a superuser account for the ticket system 171 | > cd ~ 172 | > pretix createsuperuser 173 | > # Type 'exit' when finished to return to your host terminal 174 | > exit 175 | > ``` 176 | 177 | **IMPORTANT: Do not access the web pages yet!** 178 | 179 | ### Create talk superuser in the eventyay-talk container 180 | 181 | ```bash 182 | # Execute this command in your host terminal to enter the talk container 183 | docker exec -ti eventyay-talk bash 184 | ``` 185 | 186 | > Once inside the container, run: 187 | > 188 | > ```bash 189 | > # Initialize talk system with a superuser account 190 | > cd ~ 191 | > pretalx init 192 | > # Type 'exit' when finished to return to your host terminal 193 | > exit 194 | > ``` 195 | 196 | ## Accessing the System 197 | 198 | Visit `https://app.eventyay.com/tickets/` and log in with the user/password you defined above. 199 | 200 | After logging in to tickets, you should be able to go to `https://app.eventyay.com/talk/`, click on the login text, and get automatically logged in. 201 | 202 | ## Development Workflow 203 | 204 | - Changes to Python code and templates should be reflected immediately in the docker containers and visible in the browser after container reload, if not immediately. 205 | - Changes to JavaScript pages may require rebuilds (Not Much Info Here). 206 | 207 | ## Troubleshooting 208 | 209 | If you encounter issues with the login or connections between services, ensure: 210 | 211 | 1. All containers are running (`docker ps`). 212 | 2. The host entries in `/etc/hosts` are correct. 213 | 3. You've properly initialized both the ticket and talk systems with identical credentials. 214 | 4. If using Windows WSL, consider switching to a native Ubuntu 22.04+ installation for better Docker compatibility. 215 | 5. Docker networking can sometimes be problematic with WSL - if you experience connectivity issues, try restarting the Docker service. 216 | 6. If you are having problem with user creation due to data directory permissions it is highly likely that you have done something wrong in step 3 of building and configuration. 217 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | --------------------------------------------------------------------------------