Skip to content

Commit dbd1c35

Browse files
authored
Merge branch 'enext' into fix/dropdown
2 parents 0f4954c + bbd03e0 commit dbd1c35

File tree

1,166 files changed

+250089
-73283
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,166 files changed

+250089
-73283
lines changed

.github/workflows/deploy-docs.yml

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
name: Deploy Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- enext
7+
- main
8+
paths:
9+
- 'doc/**'
10+
- '.github/workflows/deploy-docs.yml'
11+
workflow_dispatch:
12+
13+
permissions:
14+
contents: read
15+
pages: write
16+
id-token: write
17+
18+
concurrency:
19+
group: "pages"
20+
cancel-in-progress: false
21+
22+
jobs:
23+
build:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v4
28+
with:
29+
submodules: recursive
30+
31+
- name: Set up Python
32+
uses: actions/setup-python@v5
33+
with:
34+
python-version: '3.11'
35+
36+
- name: Install system dependencies
37+
run: |
38+
sudo apt-get update
39+
sudo apt-get install -y \
40+
enchant-2 \
41+
libffi-dev \
42+
libssl-dev \
43+
libxml2-dev \
44+
libxslt1-dev \
45+
gettext \
46+
libfreetype-dev \
47+
libjpeg-dev \
48+
libpq-dev \
49+
build-essential
50+
51+
- name: Install dependencies
52+
run: |
53+
python -m pip install --upgrade pip
54+
cd doc
55+
# Install all dependencies (Sphinx, Django, and all packages)
56+
bash install-all-deps.sh
57+
58+
- name: Build unified documentation
59+
run: |
60+
cd doc
61+
# Set environment variables (conf.py handles Django setup automatically)
62+
export DJANGO_SETTINGS_MODULE=eventyay.config.settings
63+
export EVENTYAY_CONFIG_FILE=$(pwd)/eventyay-docs.cfg
64+
export DATABASE_URL="sqlite:///:memory:"
65+
export REDIS_URL="redis://localhost:6379/0"
66+
export MPLCONFIGDIR=/tmp/matplotlib
67+
mkdir -p $MPLCONFIGDIR
68+
# Build documentation
69+
make html
70+
71+
- name: Prepare deployment
72+
run: |
73+
mkdir -p _site
74+
# Copy unified documentation (includes all components: tickets, talk, video)
75+
echo "Copying unified documentation..."
76+
cp -r doc/_build/html/* _site/
77+
# Copy CNAME for custom domain (docs.eventyay.com)
78+
cp doc/CNAME _site/
79+
# Create .nojekyll to prevent GitHub Pages from ignoring files starting with _
80+
touch _site/.nojekyll
81+
# List contents for verification
82+
echo "Documentation site structure:"
83+
ls -la _site/
84+
85+
- name: Setup Pages
86+
uses: actions/configure-pages@v4
87+
88+
- name: Upload artifact
89+
uses: actions/upload-pages-artifact@v3
90+
with:
91+
path: '_site'
92+
93+
deploy:
94+
environment:
95+
name: github-pages
96+
url: ${{ steps.deployment.outputs.page_url }}
97+
runs-on: ubuntu-latest
98+
needs: build
99+
steps:
100+
- name: Deploy to GitHub Pages
101+
id: deployment
102+
uses: actions/deploy-pages@v4
103+

.github/workflows/gh-pages-deploy.yml

Lines changed: 0 additions & 42 deletions
This file was deleted.

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ __pycache__/
1919
.mypy_cache/
2020
.ipython/
2121
_static/
22+
# Exception: Track documentation static files
23+
!doc/_static/
24+
!doc/talk/_static/
25+
!doc/video/_static/
2226
.idea
2327
.secret
2428
atlassian-ide-plugin.xml

README.rst

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ Getting Started
5959
4. **Install Python packages**
6060

6161
Use ``uv`` to create virtual environment and install Python packages at the same time.
62+
**Make sure you are in app directory**
6263

6364
.. code-block:: sh
6465
@@ -88,10 +89,9 @@ From now on, you can do everything with the database without specifying password
8889

8990
.. code-block:: sh
9091
91-
dropdb eventyay-db
9292
psql eventyay-db
9393
94-
In case you cannot take adavantage of PostgreSQL *peer* mode, you need to create a *.env* file with these values:
94+
In case you cannot take advantage of PostgreSQL *peer* mode, you need to create a *.env* file with these values:
9595

9696
.. code-block:: sh
9797
@@ -102,9 +102,7 @@ In case you cannot take adavantage of PostgreSQL *peer* mode, you need to create
102102
103103
6. **Activate virtual environment**
104104

105-
After running ``uv sync```, ``uv`` will activate the virtual environment. But if you are back
106-
to work on the project another, we don't run ``uv``, then we activate the virtual environment by:
107-
105+
After running ``uv sync```, activate a virtual environment
108106

109107
.. code-block:: sh
110108
@@ -117,11 +115,23 @@ to work on the project another, we don't run ``uv``, then we activate the virtua
117115
118116
python manage.py migrate
119117
120-
8. **Create a superuser account** (for accessing the admin panel):
118+
If you see any Redis issues, Install Redis and start it:
119+
120+
**Update configuration**
121+
122+
123+
Edit ``app/eventyay.cfg`` and change Redis URLs from
124+
``redis://eventyay-next-redis`` **to**
125+
``redis://localhost:6379/``
126+
127+
128+
Do **not** edit the database numbers (0, 1, etc.).
129+
130+
8. **Create a admin user account** (for accessing the admin panel):
121131

122132
.. code-block:: bash
123133
124-
python manage.py createsuperuser
134+
python manage.py create_admin_user
125135
126136
9. **Run the development server**:
127137

@@ -166,7 +176,7 @@ We assume your current working directory is the checkout of this repo.
166176
167177
5. **Create a superuser account** (for accessing the admin panel):
168178

169-
This should be necessary only once, since the database is persisted
179+
This should be necessary only once, since the database is persisted
170180
as docker volume. If you see strange behaviour, see the point 3.
171181
on how to reset.
172182

app/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ dist/
88
*.bak
99
eventyay/static/jsi18n/
1010
node_modules/
11-
11+
.zed

app/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,8 @@ ENV PATH="/usr/src/app/.venv/bin:$PATH"
3333
# Run npm stuff
3434
RUN make npminstall
3535

36+
# Build webapp
37+
RUN make webappbuild
38+
3639
# run entrypoint.sh
3740
ENTRYPOINT ["/usr/src/app/entrypoint.sh"]

app/Dockerfile.prod

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,15 @@ COPY Makefile Makefile
3030
# global-nav-menu
3131
COPY eventyay/frontend/global-nav-menu eventyay/frontend/global-nav-menu
3232
RUN npm ci --prefix=eventyay/frontend/global-nav-menu
33-
RUN npm run build --prefix=eventyay/frontend/global-nav-menu
33+
RUN OUT_DIR=/home/app/web/eventyay/static npm run build --prefix=eventyay/frontend/global-nav-menu
3434
# schedule editor
3535
COPY eventyay/frontend/schedule-editor eventyay/frontend/schedule-editor
3636
RUN npm ci --prefix=eventyay/frontend/schedule-editor
37-
RUN npm run build --prefix=eventyay/frontend/schedule-editor
37+
RUN OUT_DIR=/home/app/web/eventyay/static npm run build --prefix=eventyay/frontend/schedule-editor
38+
# webapp
39+
COPY eventyay/webapp eventyay/webapp
40+
RUN npm install --prefix=eventyay/webapp
41+
RUN OUT_DIR=/home/app/web/eventyay/static npm run build --prefix=eventyay/webapp
3842

3943

4044
#########
@@ -58,7 +62,7 @@ RUN mkdir $APP_HOME/static
5862
WORKDIR $APP_HOME
5963

6064
# install dependencies
61-
RUN apt-get update && apt-get install -y --no-install-recommends netcat-traditional nodejs
65+
RUN apt-get update && apt-get install -y --no-install-recommends netcat-traditional nodejs gettext
6266

6367
# copy entrypoint.prod.sh
6468
COPY ./entrypoint.prod.sh .
@@ -74,8 +78,9 @@ RUN chown -R app:app $APP_HOME
7478
# Copy the Python environment from the builder
7579
# Note: The venv path in the builder must match the one in runner.
7680
COPY --from=builder --chown=app:app $APP_HOME/.venv $APP_HOME/.venv
77-
COPY --from=builder --chown=app:app $APP_HOME/eventyay/frontend/global-nav-menu/dist $APP_HOME/eventyay/frontend/global-nav-menu/dist
78-
COPY --from=builder --chown=app:app $APP_HOME/eventyay/frontend/schedule-editor/dist $APP_HOME/eventyay/frontend/schedule-editor/dist
81+
COPY --from=builder --chown=app:app $APP_HOME/eventyay/static/global-nav-menu $APP_HOME/eventyay/static/global-nav-menu
82+
COPY --from=builder --chown=app:app $APP_HOME/eventyay/static/schedule-editor $APP_HOME/eventyay/static/schedule-editor
83+
COPY --from=builder --chown=app:app $APP_HOME/eventyay/static/webapp $APP_HOME/eventyay/static/webapp
7984

8085
# change to the app user
8186
USER app

app/Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ npminstall:
2929
mkdir -p eventyay/static.dist/node_prefix/
3030
cp -r eventyay/static/npm_dir/* eventyay/static.dist/node_prefix/
3131
npm install --prefix=eventyay/static.dist/node_prefix
32+
npm ci --prefix=eventyay/frontend/global-nav-menu
3233
npm ci --prefix=eventyay/frontend/schedule-editor
33-
npm run build --prefix=eventyay/frontend/schedule-editor
34+
OUT_DIR=$(shell pwd)/eventyay/static npm run build --prefix=eventyay/frontend/global-nav-menu
35+
OUT_DIR=$(shell pwd)/eventyay/static npm run build --prefix=eventyay/frontend/schedule-editor
36+
37+
webappbuild:
38+
npm ci --prefix=eventyay/webapp
39+
OUT_DIR=$(shell pwd)/eventyay/static npm run build --prefix=eventyay/webapp
3440

app/entrypoint.prod.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ done
88

99
echo "PostgreSQL started"
1010

11+
echo "============== compiling translation messages ================"
12+
python manage.py compilemessages
13+
echo "============== compiling JS translation messages ================"
14+
python manage.py compilejsi18n
1115
echo "============== running collectstatic ================"
1216
python manage.py collectstatic --noinput
1317
echo "============== running compress ====================="

app/eventyay.cfg

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,11 @@ url=https://next.eventyay.com
55
currency=USD
66
; DO NOT change the following value, it has to be set to the location of the
77
; directory *inside* the docker container
8-
datadir=/data
98
trust_x_forwarded_for=on
109
trust_x_forwarded_proto=on
1110
registration=on
1211
talk_hostname=https://next.eventyay.com
1312
video_server_hostname=https://next.eventyay.com:8443
14-
base_path=/tickets
1513

1614
[urls]
1715
static=/static/

0 commit comments

Comments
 (0)