Skip to content

Commit

Permalink
Merge branch 'main' of github.com:chaostreff-flensburg/c4s-website
Browse files Browse the repository at this point in the history
  • Loading branch information
scammo committed Dec 26, 2023
2 parents 4651583 + e74e685 commit fabf1e1
Show file tree
Hide file tree
Showing 7 changed files with 68 additions and 34 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Build and Deploy app

on:
push:
branches: ["main"]

concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Docker Setup Buildx
uses: docker/[email protected]

- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Frontend
uses: docker/build-push-action@v3
with:
context: .
file: docker/frontend/Dockerfile
push: true
tags: "ghcr.io/${{ github.repository }}/frontend:latest"

- name: pull and start new image
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USER_NAME }}
key: ${{ secrets.PRIVATE_KEY}}
script: cd c4s-website && docker compose pull && docker compose up -d
6 changes: 3 additions & 3 deletions content/_components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ export default ({ text }) => (
<div class="col-auto">
<p>
{text.footer_slogan}{" "}
<a href="https://ccc.de/">Chaos Computer Club e.V.</a>
<a href="https://ccc.de/" target="_blank">Chaos Computer Club e.V.</a>
</p>
</div>
<div class="col-auto">
<p>
<a href="https://www.ccc.de/de/imprint">
<a href="https://www.ccc.de/de/imprint" target="_blank">
{text.footer_imprint}
{!text.footer_imprint && <span>Impressum</span>}
</a>{" "}
&{" "}
<a href="https://www.ccc.de/de/datenschutz">
<a href="https://www.ccc.de/de/datenschutz" target="_blank">
{text.footer_privacy}
{!text.footer_privacy && <span>Datenschutz</span>}
</a>
Expand Down
17 changes: 0 additions & 17 deletions docker-compose.example.yml

This file was deleted.

18 changes: 7 additions & 11 deletions docker-compose.prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,17 @@ version: "3.7"
networks:
web:
external: true
c4s-website:

services:

app:
image: ghcr.io/chaostreff-flensburg/c4s-website/frontend:latest
restart: unless-stopped
restart: always
networks:
- web
- c4s-website
labels:
- traefik.enable=true
- traefik.http.routers.c4s-website.rule=Host(`42.ccc.de`)
- traefik.http.routers.c4s-website.entrypoints=websecure
- traefik.http.routers.c4s-website.tls=true
- traefik.http.routers.c4s-website.certresolver=le
- traefik.http.services.c4s-website.loadbalancer.server.port=8080
- traefik.docker.network=web
- "traefik.enable=true"
- "traefik.http.routers.c4s-website.rule=Host(`42.ccc.de`)"
- "traefik.http.routers.c4s-website.entrypoints=https,http"
- "traefik.http.services.c4s-website.loadbalancer.server.port=80"
- "traefik.http.routers.c4s-website.tls.certresolver=mytlschallenge"
- "traefik.docker.network=web"
10 changes: 10 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: "3"

services:
frontend:
build:
context: .
dockerfile: "docker/frontend/Dockerfile"
restart: always
ports:
- "8080:8080"
1 change: 0 additions & 1 deletion docker/frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ RUN deno cache build.ts
ADD . .
RUN deno task build


# build nginx webserver
FROM nginx:alpine

Expand Down
4 changes: 2 additions & 2 deletions docker/frontend/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ http {
# tcp_nopush on;
keepalive_timeout 3;
# tcp_nodelay on;
# gzip on;
gzip on;

client_max_body_size 1m;

server {
listen 8080 default_server;
listen 80 default_server;
server_name _;

location / {
Expand Down

0 comments on commit fabf1e1

Please sign in to comment.