-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into add-checkboxes-to-data-input
- Loading branch information
Showing
46 changed files
with
1,993 additions
and
905 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: docker containers | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
concurrency: | ||
group: docker-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
docker: | ||
runs-on: ubuntu-latest | ||
name: "Docker" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: docker compose build | ||
- uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | ||
- run: | | ||
echo $MONDEY_DOCKER_IMAGE_TAG | ||
docker compose build | ||
docker compose push | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | ||
env: | ||
MONDEY_DOCKER_IMAGE_TAG: ${{ github.sha }} | ||
- run: | | ||
echo $MONDEY_DOCKER_IMAGE_TAG | ||
docker compose build | ||
docker compose push | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | ||
env: | ||
MONDEY_DOCKER_IMAGE_TAG: "latest" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
# [mondey-frontend-prototype](https://ssciwr.github.io/mondey-frontend-prototype) | ||
# [mondey](https://ssciwr.github.io/mondey) | ||
[![run tests](https://github.com/ssciwr/mondey/actions/workflows/ci.yml/badge.svg)](https://github.com/ssciwr/mondey/actions/workflows/ci.yml) | ||
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=ssciwr_mondey&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=ssciwr_mondey) | ||
[![codecov](https://codecov.io/gh/ssciwr/mondey/graph/badge.svg?token=1YBO3KUDAR)](https://codecov.io/gh/ssciwr/mondey) | ||
|
||
Initial frontend prototyping for the MONDEY project. | ||
Initial development for the MONDEY project. | ||
|
||
The static website is automatically built and deployed to | ||
[ssciwr.github.io/mondey-frontend-prototype](https://ssciwr.github.io/mondey-frontend-prototype) | ||
[ssciwr.github.io/mondey](https://ssciwr.github.io/mondey) | ||
on every push to the main branch using this [Github Action](.github/workflows/deploy.yml). | ||
|
||
## Component demos | ||
|
||
- [Milestone](https://ssciwr.github.io/mondey-frontend-prototype/milestone) | ||
- [Milestonegroup](https://ssciwr.github.io/mondey-frontend-prototype/milestonegroup) | ||
- [Milestone](https://ssciwr.github.io/mondey/milestone) | ||
- [Milestonegroup](https://ssciwr.github.io/mondey/milestonegroup) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
services: | ||
backend: | ||
image: ghcr.io/ssciwr/mondey_backend:${MONDEY_DOCKER_IMAGE_TAG:-latest} | ||
build: ./mondey_backend | ||
volumes: | ||
- ${STATIC_FILES_PATH:-./static}:/app/static | ||
- ${DATABASE_PATH:-./db}:/app/db | ||
environment: | ||
- SECRET=${SECRET:-} | ||
- STATIC_FILES_PATH=/app/static | ||
- DATABASE_PATH=/app/db | ||
- ENABLE_CORS=${ENABLE_CORS:-false} | ||
- HOST=${HOST:-backend} | ||
- PORT=${PORT:-80} | ||
- RELOAD=${RELOAD:-false} | ||
- LOG_LEVEL=${LOG_LEVEL:-info} | ||
frontend: | ||
image: ghcr.io/ssciwr/mondey_frontend:${MONDEY_DOCKER_IMAGE_TAG:-latest} | ||
build: | ||
context: ./frontend | ||
args: | ||
- MONDEY_API_URL=/api | ||
ports: | ||
- "80:80" | ||
- "443:443" | ||
# volumes: | ||
# - ${MONDEY_SSL_CERT:-./cert.pem}:/MONDEY_ssl_cert.pem | ||
# - ${MONDEY_SSL_KEY:-./key.pem}:/MONDEY_ssl_key.pem | ||
# email: | ||
# image: "boky/postfix" | ||
# environment: | ||
# - ALLOW_EMPTY_SENDER_DOMAINS="true" | ||
# networks: | ||
# - mondey-network |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
VITE_MONDEY_API_URL=http://localhost:8000 | ||
# api location for local development: | ||
VITE_MONDEY_API_URL=http://localhost:8000/api |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,6 @@ | |
package-lock.json | ||
pnpm-lock.yaml | ||
yarn.lock | ||
# build artefacts | ||
.svelte-kit | ||
build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
FROM node:22-slim AS builder | ||
|
||
LABEL org.opencontainers.image.source=https://github.com/ssciwr/mondey | ||
LABEL org.opencontainers.image.description="MONDEY frontend production image" | ||
|
||
ARG MONDEY_API_URL | ||
|
||
WORKDIR /app | ||
|
||
COPY package*.json ./ | ||
|
||
RUN npm install -g pnpm && pnpm install | ||
|
||
COPY . . | ||
|
||
RUN echo "VITE_MONDEY_API_URL=${MONDEY_API_URL}" > .env && pnpm run build | ||
|
||
FROM nginx:1.27.1 | ||
|
||
COPY --from=builder /app/build /usr/share/nginx/html | ||
|
||
COPY nginx.conf /etc/nginx/conf.d/default.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
server { | ||
listen 80; | ||
# listen 443 ssl; | ||
# listen [::]:443 ssl; | ||
http2 on; | ||
server_name localhost; | ||
# ssl_certificate /ssl_cert.pem; | ||
# ssl_certificate_key /ssl_key.pem; | ||
|
||
# Maximum file upload size | ||
client_max_body_size 20M; | ||
|
||
# Improve HTTPS performance with session resumption | ||
ssl_session_cache shared:SSL:10m; | ||
ssl_session_timeout 10m; | ||
|
||
# Enable server-side protection against BEAST attacks | ||
ssl_protocols TLSv1.2; | ||
ssl_prefer_server_ciphers on; | ||
ssl_ciphers "ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384"; | ||
|
||
# Aditional Security Headers | ||
# ref: https://developer.mozilla.org/en-US/docs/Security/HTTP_Strict_Transport_Security | ||
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains"; | ||
|
||
# ref: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options | ||
add_header X-Frame-Options DENY always; | ||
|
||
# ref: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options | ||
add_header X-Content-Type-Options nosniff always; | ||
|
||
# ref: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-XSS-Protection | ||
add_header X-Xss-Protection "1; mode=block" always; | ||
|
||
location / { | ||
root /usr/share/nginx/html; | ||
index index.html index.htm; | ||
try_files $uri $uri/ /index.html; | ||
} | ||
|
||
location /api/ { | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
proxy_set_header Host $http_host; | ||
proxy_redirect off; | ||
proxy_pass http://backend:80; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.