Skip to content

Commit 78e8c79

Browse files
authored
Merge pull request #83 from FiQCI/master
Add bookings view and docker environment
2 parents 499fd34 + 2fcfbae commit 78e8c79

23 files changed

Lines changed: 980 additions & 136 deletions

‎.dockerignore‎

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Git
2+
.git
3+
.gitignore
4+
5+
# Docker
6+
Dockerfile
7+
docker-compose.yml
8+
.dockerignore
9+
10+
# Dependencies
11+
node_modules
12+
vendor/
13+
.bundle
14+
15+
# Build outputs
16+
dist/
17+
_site/
18+
.sass-cache/
19+
.jekyll-cache/
20+
.jekyll-metadata
21+
22+
# Logs
23+
npm-debug.log*
24+
yarn-debug.log*
25+
yarn-error.log*
26+
27+
# OS generated files
28+
.DS_Store
29+
.DS_Store?
30+
._*
31+
.Spotlight-V100
32+
.Trashes
33+
ehthumbs.db
34+
Thumbs.db
35+
36+
# IDE
37+
.vscode/
38+
.idea/
39+
*.swp
40+
*.swo
41+
42+
# Temporary files
43+
*.tmp
44+
*.temp

‎Dockerfile‎

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Use Ruby 3.3.5 as base image
2+
FROM ruby:3.3.5-slim
3+
4+
# Install system dependencies
5+
RUN apt-get update && apt-get install -y \
6+
build-essential \
7+
curl \
8+
git \
9+
&& rm -rf /var/lib/apt/lists/*
10+
11+
# Install Node.js 22.10.0
12+
RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
13+
&& apt-get install -y nodejs
14+
15+
# Verify versions
16+
RUN ruby --version && node --version && npm --version
17+
18+
# Set working directory
19+
WORKDIR /app
20+
21+
# Copy dependency files first for better caching
22+
COPY Gemfile Gemfile.lock ./
23+
COPY package.json package-lock.json* ./
24+
25+
# Install bundler and Ruby gems
26+
RUN gem install bundler
27+
RUN bundle config set --local path 'vendor/bundle'
28+
RUN bundle install
29+
30+
# Install Node.js packages
31+
RUN npm install
32+
33+
# Copy the rest of the application
34+
COPY . .
35+
36+
# Set up Jekyll source directory
37+
ENV JEKYLL_ENV=development
38+
ENV BUNDLE_PATH=vendor/bundle
39+
40+
# Expose port 4000 for Jekyll
41+
EXPOSE 4000
42+
43+
# Default command - can be overridden in docker-compose
44+
CMD ["npm", "run", "watch"]

‎Gemfile.lock‎

Lines changed: 16 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -3,43 +3,20 @@ GEM
33
specs:
44
addressable (2.8.7)
55
public_suffix (>= 2.0.2, < 7.0)
6-
bigdecimal (3.1.8)
76
colorator (1.1.0)
87
concurrent-ruby (1.3.4)
98
em-websocket (0.5.3)
109
eventmachine (>= 0.12.9)
1110
http_parser.rb (~> 0)
1211
eventmachine (1.2.7)
13-
ffi (1.17.0)
14-
ffi (1.17.0-aarch64-linux-gnu)
15-
ffi (1.17.0-aarch64-linux-musl)
16-
ffi (1.17.0-arm-linux-gnu)
17-
ffi (1.17.0-arm-linux-musl)
18-
ffi (1.17.0-arm64-darwin)
19-
ffi (1.17.0-x86-linux-gnu)
20-
ffi (1.17.0-x86-linux-musl)
21-
ffi (1.17.0-x86_64-darwin)
22-
ffi (1.17.0-x86_64-linux-gnu)
23-
ffi (1.17.0-x86_64-linux-musl)
12+
ffi (1.17.2)
2413
forwardable-extended (2.6.0)
25-
google-protobuf (4.28.3)
26-
bigdecimal
27-
rake (>= 13)
28-
google-protobuf (4.28.3-aarch64-linux)
29-
bigdecimal
30-
rake (>= 13)
31-
google-protobuf (4.28.3-arm64-darwin)
32-
bigdecimal
33-
rake (>= 13)
34-
google-protobuf (4.28.3-x86-linux)
35-
bigdecimal
36-
rake (>= 13)
37-
google-protobuf (4.28.3-x86_64-darwin)
38-
bigdecimal
39-
rake (>= 13)
40-
google-protobuf (4.28.3-x86_64-linux)
41-
bigdecimal
42-
rake (>= 13)
14+
google-protobuf (3.25.8)
15+
google-protobuf (3.25.8-aarch64-linux)
16+
google-protobuf (3.25.8-arm64-darwin)
17+
google-protobuf (3.25.8-x86-linux)
18+
google-protobuf (3.25.8-x86_64-darwin)
19+
google-protobuf (3.25.8-x86_64-linux)
4320
http_parser.rb (0.8.0)
4421
i18n (1.14.6)
4522
concurrent-ruby (~> 1.0)
@@ -82,82 +59,40 @@ GEM
8259
rexml (3.3.9)
8360
rouge (4.5.1)
8461
safe_yaml (1.0.5)
85-
sass-embedded (1.80.6)
86-
google-protobuf (~> 4.28)
87-
rake (>= 13)
88-
sass-embedded (1.80.6-aarch64-linux-android)
89-
google-protobuf (~> 4.28)
90-
sass-embedded (1.80.6-aarch64-linux-gnu)
91-
google-protobuf (~> 4.28)
92-
sass-embedded (1.80.6-aarch64-linux-musl)
93-
google-protobuf (~> 4.28)
94-
sass-embedded (1.80.6-aarch64-mingw-ucrt)
95-
google-protobuf (~> 4.28)
96-
sass-embedded (1.80.6-arm-linux-androideabi)
97-
google-protobuf (~> 4.28)
98-
sass-embedded (1.80.6-arm-linux-gnueabihf)
99-
google-protobuf (~> 4.28)
100-
sass-embedded (1.80.6-arm-linux-musleabihf)
101-
google-protobuf (~> 4.28)
102-
sass-embedded (1.80.6-arm64-darwin)
103-
google-protobuf (~> 4.28)
104-
sass-embedded (1.80.6-riscv64-linux-android)
105-
google-protobuf (~> 4.28)
106-
sass-embedded (1.80.6-riscv64-linux-gnu)
107-
google-protobuf (~> 4.28)
108-
sass-embedded (1.80.6-riscv64-linux-musl)
109-
google-protobuf (~> 4.28)
110-
sass-embedded (1.80.6-x86-cygwin)
111-
google-protobuf (~> 4.28)
112-
sass-embedded (1.80.6-x86-linux-android)
113-
google-protobuf (~> 4.28)
114-
sass-embedded (1.80.6-x86-linux-gnu)
115-
google-protobuf (~> 4.28)
116-
sass-embedded (1.80.6-x86-linux-musl)
117-
google-protobuf (~> 4.28)
118-
sass-embedded (1.80.6-x86-mingw-ucrt)
119-
google-protobuf (~> 4.28)
120-
sass-embedded (1.80.6-x86_64-cygwin)
121-
google-protobuf (~> 4.28)
122-
sass-embedded (1.80.6-x86_64-darwin)
123-
google-protobuf (~> 4.28)
124-
sass-embedded (1.80.6-x86_64-linux-android)
125-
google-protobuf (~> 4.28)
126-
sass-embedded (1.80.6-x86_64-linux-gnu)
127-
google-protobuf (~> 4.28)
128-
sass-embedded (1.80.6-x86_64-linux-musl)
129-
google-protobuf (~> 4.28)
62+
sass-embedded (1.69.5)
63+
google-protobuf (~> 3.23)
64+
rake (>= 13.0.0)
13065
terminal-table (3.0.2)
13166
unicode-display_width (>= 1.1.1, < 3)
13267
unicode-display_width (2.6.0)
13368
webrick (1.9.0)
13469

13570
PLATFORMS
71+
aarch64-linux
13672
aarch64-linux
13773
aarch64-linux-android
138-
aarch64-linux-gnu
13974
aarch64-linux-musl
14075
aarch64-mingw-ucrt
76+
arm-linux
77+
arm-linux
14178
arm-linux-androideabi
142-
arm-linux-gnu
143-
arm-linux-gnueabihf
14479
arm-linux-musl
14580
arm-linux-musleabihf
14681
arm64-darwin
82+
riscv64-linux
14783
riscv64-linux-android
148-
riscv64-linux-gnu
14984
riscv64-linux-musl
15085
ruby
15186
x86-cygwin
15287
x86-linux
88+
x86-linux
15389
x86-linux-android
154-
x86-linux-gnu
15590
x86-linux-musl
15691
x86-mingw-ucrt
15792
x86_64-cygwin
15893
x86_64-darwin
94+
x86_64-linux
15995
x86_64-linux-android
160-
x86_64-linux-gnu
16196
x86_64-linux-musl
16297

16398
DEPENDENCIES

‎README.md‎

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ This is the repository for building and maintaining the webpage for the Finnish
33
## Contents
44
- [Site rewrite](#site-rewrite)
55
- [Running Locally](#running-locally)
6+
- [Using Docker](#using-docker)
67
- [Tools](#tools)
78
- [Install `asdf` for runtime version management](#install-asdf-for-runtime-version-management)
89
- [Install Ruby and Node.js using `asdf`](#install-ruby-and-nodejs-using-asdf)
@@ -19,6 +20,23 @@ The site was recently overhauled. Here you can find documentation on how to add
1920

2021
## Running Locally
2122

23+
### Using Docker
24+
25+
A [`Dockerfile`](./Dockerfile) and [`docker-compose.yml`](./docker-compose.yml) are provided to build and view the website locally using a containerised environment. To build the docker container use
26+
27+
```sh
28+
docker compose build
29+
```
30+
31+
And then run the container with:
32+
33+
```sh
34+
docker compose up
35+
```
36+
37+
The site is viewable at [`http://localhost:4000/`](http://localhost:4000/).
38+
39+
2240
### Tools
2341

2442
- (`asdf` for runtime version management)
@@ -122,4 +140,4 @@ For adding a blog post see: [Adding a blog](docs/blog_post.md)
122140

123141
For adding an event see: [Adding an event](docs/event.md)
124142

125-
For editing the general contents of the site see: [Editing content](docs/edit_or_add_content.md)
143+
For editing the general contents of the site see: [Editing content](docs/edit_or_add_content.md)

‎content/_includes/head.html‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,18 @@
1717
{% endif %}
1818

1919
<!--{\%- seo -\%}-->
20-
<link rel="icon" href="{{ constants.favicon | absolute_url }}" />
21-
<link rel="stylesheet" href="{{ 'properties.css' | absolute_url }}" />
22-
<link rel="stylesheet" href="{{ 'main.css' | absolute_url }}" />
20+
<link rel="icon" href="{{ constants.favicon | relative_url }}" />
21+
<link rel="stylesheet" href="{{ 'properties.css' | relative_url }}" />
22+
<link rel="stylesheet" href="{{ 'main.css' | relative_url }}" />
2323
{% include external/mathjax.html -%}
2424
{% include external/font.html %}
25-
<script type="text/javascript" src="{{ "site.js" | absolute_url }}" charset="utf-8"></script>
25+
<script type="text/javascript" src="{{ "site.js" | relative_url }}" charset="utf-8"></script>
2626
{% if page.react and (site.pages | where: "name" page.name) %}
2727
{%- assign react_source = page.name | append: ".js" -%}
2828
{% elsif (site.collections | where: "label" page.collection) %}
2929
{%- assign react_source = page.layout | append: ".js" %}
3030
{% else %}
3131
{%- assign react_source = "default.js" -%}
3232
{% endif %}
33-
<script type="text/javascript" src="{{ react_source | absolute_url }}" charset="utf-8"></script>
33+
<script type="text/javascript" src="{{ react_source | relative_url }}" charset="utf-8"></script>
3434
</head>

‎content/_includes/post-list.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
{%- assign date_format = constants.date_format | default: "%b %-d, %Y" -%}
88
<span class="text-sm">{{ post.date | date: date_format }}</span>
99
<div class="text-lg">
10-
<a class="block font-medium" href="{{ post.url | absolute_url }}">
10+
<a class="block font-medium" href="{{ post.url | relative_url }}">
1111
{{ post.title | escape }}
1212
</a>
1313
</div>

‎content/pages/search.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ title: Search Results
44
react: true
55
---
66

7-
<script type="text/javascript" src="{{ "store.js" | absolute_url }}" charset="utf-8"></script>
7+
<script type="text/javascript" src="{{ "store.js" | relative_url }}" charset="utf-8"></script>
88
{%- include react/root.html id='site-search' -%}

‎content/properties.css.liquid‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ permalink: properties.css
44

55
@layer components {
66
:root {
7-
--fiqci-banner-image: url({{ '/assets/images/FiQCI-banner.jpg' | absolute_url }});
7+
--fiqci-banner-image: url({{ '/assets/images/FiQCI-banner.jpg' | relative_url }});
88
}
99
}

‎content/site.js.liquid‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ permalink: site.js
88
"key": "{{ forloop.index }}",
99
"type": "{{ publication.filters.Type | default: 'Post' }}",
1010
"title": "{{ publication.title }}",
11-
"url": "{{ publication.url | absolute_url }}",
11+
"url": "{{ publication.url | relative_url }}",
1212
"date": "{{ publication.date | date: '%-d.%-m.%Y' }}",
13-
"teaser": "{{ publication.header.teaser | absolute_url }}",
13+
"teaser": "{{ publication.header.teaser | relative_url }}",
1414
"filters": {
1515
{%- for category in publication.filters %}
1616
"{{ category[0] }}": "{{ category[1] }}"

‎docker-compose.yml‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
services:
2+
fiqci-dev:
3+
build: .
4+
ports:
5+
- "4000:4000"
6+
- "35729:35729"
7+
volumes:
8+
# Mount source code but exclude dependencies
9+
- .:/app
10+
- /app/node_modules # prevent host's node_modules from overriding container's node_modules
11+
- /app/vendor # prevent host's vendor directory from overriding container's Ruby gems
12+
environment:
13+
- BUNDLE_PATH=vendor/bundle
14+
- NODE_ENV=development
15+
- JEKYLL_ENV=development
16+
- JEKYLL_HOST=0.0.0.0
17+
command: npm run watch
18+
working_dir: /app

0 commit comments

Comments
 (0)