Skip to content

Commit

Permalink
Merge branch 'master' of github.com:fykosak/webs
Browse files Browse the repository at this point in the history
  • Loading branch information
vanekm committed Nov 21, 2023
2 parents b181061 + 931868d commit 444f364
Show file tree
Hide file tree
Showing 15 changed files with 307 additions and 644 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/deploy-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Create and publish a Docker image
on: push

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
33 changes: 33 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Compile Javascript and CSS
FROM node:latest AS node-builder
WORKDIR /usr/src/webs
COPY . .
RUN npm install && npm run build

# Install PHP dependencies and init translations
FROM composer as composer-builder
WORKDIR /usr/src/webs
COPY --from=node-builder /usr/src/webs /usr/src/webs
RUN composer install --no-dev --no-interaction --no-progress --optimize-autoloader --ignore-platform-reqs

# Prepare files for the final image
RUN mkdir /usr/src/final
RUN cp -r /usr/src/webs/app /usr/src/webs/www /usr/src/webs/vendor /usr/src/final/

# Final image
FROM php:8.2-apache
RUN apt-get update && apt install -y \
gettext \
locales \
&& docker-php-ext-configure gettext \
&& docker-php-ext-install \
gettext \
&& a2enmod rewrite \
&& sed -i -e 's/# cs_CZ.UTF-8/cs_CZ.UTF-8/' /etc/locale.gen \
&& sed -i -e 's/# en_US.UTF-8/en_US.UTF-8/' /etc/locale.gen \
&& dpkg-reconfigure --frontend=noninteractive locales

USER www-data
WORKDIR /var/www/webs
COPY --chown=www-data --from=composer-builder /usr/src/final /var/www/webs/
RUN ./app/i18n/compile.sh
6 changes: 5 additions & 1 deletion app/Bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ private static function boot(string $site): Configurator
->register();

$configurator->addConfig(__DIR__ . '/config/config.' . $site . '.neon');
$configurator->addConfig(__DIR__ . '/config/config.' . $site . '.local.neon');
if (getenv('NETTE_EXTERNAL_LOCAL_CONFIG') === '1') {
$configurator->addConfig(__DIR__ . '/config/local/config.' . $site . '.local.neon');
} else {
$configurator->addConfig(__DIR__ . '/config/config.' . $site . '.local.neon');
}

return $configurator;
}
Expand Down
62 changes: 18 additions & 44 deletions app/Modules/Fof/DefaultModule/templates/Accommodation/default.latte
Original file line number Diff line number Diff line change
Expand Up @@ -51,61 +51,35 @@
{case 'cs'}
{* <div class="subheader">Ubytování</div>*}
<h1>Ceny za ubytování a platba</h1>
{* <p>Cena za jednotlivé noci se liší, neboť je z části dotována Matematicko-fyzikální fakultou Univerzity Karlovy.</p>
<p>Cena za jednotlivé noci se liší, neboť je z části dotována. Je možné se ubytovat i jiné dny, a to za plnou cenu 550 Kč.</p>
<ul>
<li>Středa 8. 2. 2023 &#8211; 500 Kč</li>
<li>Čtvrtek 9. 2. 2023 &#8211; 300 Kč (noc před soutěží)</li>
<li>Pátek 10. 2. 2023 &#8211; 400 Kč</li>
<li>Sobota 11. 2. 2023 &#8211; 400 Kč</li>
<li>Středa 14. 2. 2024 &#8211; 450 Kč</li>
<li>Čtvrtek 15. 2. 2024 &#8211; 350 Kč (noc před soutěží)</li>
<li>Pátek 16. 2. 2024 &#8211; 450 Kč</li>
<li>Sobota 17. 2. 2024 &#8211; 450 Kč</li>
</ul>
<p>Soutěžící budou ubytování na trojlůžkových pokojích. V případě zájmu mohou také požádat o jednolůžkový pokoj za plnou cenu 1190 Kč.</p>
<p><strong>Kvůli velkému zájmu jsme navýšili kapacity o další pokoje, bohužel již za plnou cenu 500 CZK.</strong></p>*}
<p>Konkrétní informace o cenách ubytování a platbě zveřejníme později.</p>
<p>Soutěžící budou ubytování na trojlůžkových pokojích. V případě zájmu mohou také požádat o jednolůžkový pokoj za plnou cenu 1250 Kč.</p>
<p><strong>Prosím počítejte s městským poplatkem ve výši 50 Kč, který budou hradit všichni účastníci starší 18 let při příjezdu na hotel.</strong></p>
{* <p><strong>Kvůli velkému zájmu jsme navýšili kapacity o další pokoje, bohužel již za plnou cenu 550 CZK.</strong></p>*}
<p>Konkrétní informace o platbě za ubytování zveřejníme později.</p>
{default}
{* <div class="subheader">Accommodation</div>*}
<h1>Price and Payment</h1>
{* <p>The prices for individual nights vary, as the accomodation is partially subsidized by FMP CUNI.</p>
<p>The prices for individual nights vary, as the accomodation is partially subsidized. It is possible to book the accomodation for other days as well for the full price 52 &#128;.</p>
<ul>
<li>Wednesday 8. 2. 2023 &#8211; 21 &#128;</li>
<li>Thursday 9. 2. 2023 &#8211; 13 &#128; (the night before the competition)</li>
<li>Friday 10. 2. 2023 &#8211; 17 &#128;</li>
<li>Saturday 11. 2. 2023 &#8211; 17 &#128;</li>
<li>Wednesday 14th Feb 2024 &#8211; 20 &#128;</li>
<li>Thursday 15th Feb 2024 &#8211; 16 &#128; (the night before the competition)</li>
<li>Friday 16th Feb 2024 &#8211; 20 &#128;</li>
<li>Saturday 17th Feb 2024 &#8211; 20 &#128;</li>
</ul>
<p>Competitors will be accomodated at triple rooms. If interested, they can also request a single room for the full price 49 &#128;.</p>
<p><strong>Due to great demand for accommodation, we added some capacity (unfortunately for full price 21 &#128;).</strong></p>*}
<p>Accommodation price and payment details will be specified later.</p>
<p>Competitors will be accomodated at triple rooms. If interested, they can also request a single room for the full price 52 &#128;.</p>
<p><strong>Please note that the participants older than 18 years will need to pay the city tax of approx. 3 &#128; per night at the arrival to the hotel.</strong></p>
{* <p><strong>Due to great demand for accommodation, we added some capacity (unfortunately for full price 24 &#128;).</strong></p>*}
<p>Accommodation payment details will be specified later.</p>
{/switch}
</section>
</div>
{if false}
<div class="panel color-auto">
<section class="inner-container">
{switch $lang}
{case 'cs'}
{* <div class="subheader">Ubytování</div>*}
<h1>Ceny a volná místa</h1>
<p>Cena za jednotlivé noci se liší, neboť je z části dotována Matematicko-fyzikální fakultou Univerzity Karlovy.</p>
<ul>
<li>Čtvrtek 10. 2. 2022 &#8211; 200 Kč (noc před soutěží)</li>
<li>Pátek 11. 2. 2022 &#8211; 300 Kč</li>
<li>Sobota 12. 2. 2022 &#8211; 300 Kč</li>
</ul>
<p>Kvůli velkému zájmu jsme navýšili kapacity o další pokoje, bohužel již za plnou cenu 500 CZK. Pokud máte zájem o ubytování i na další dny, napište nám na <a href="mailto:[email protected]">[email protected]</a>.
</p>
{default}
{* <div class="subheader">Accommodation</div>*}
<h1>Price and Available Accommodation Capacity</h1>
<p>Hotel capacity is finite, subsidized prices for particular nights are as follows.</p>
<ul>
<li>Thursday 10. 2. 2022 &#8211; 8 &#128; (the night before the competition)</li>
<li>Friday 11. 2. 2022 &#8211; 12 &#128;</li>
<li>Saturday 12. 2. 2022 &#8211; 12 &#128;</li>
</ul>
<p>Due to great demand for accommodation, we added some capacity (unfortunately for full price 21 &#128;). If you wish to have accommodation for some extra days, please contact us at <a href="mailto:[email protected]">[email protected]</a>.</p>
<p>There are twin rooms and triple rooms available. Competitors and their teachers will be assigned a room depending on their length of stay and then depending on their preferences (i.e. those accommodated for more nights very probably will not be in a room with those staying one night only). Single rooms are available for full price 45 &#128;.</p>
{/switch}
</section>
</div>

<div class="panel color-auto" id="how-to-pay">
<section class="inner-container">
Expand Down
Loading

0 comments on commit 444f364

Please sign in to comment.