adding frontend to cicd
Some checks failed
Build and Deploy Backend / Run Linters and Tests (Backend) (push) Successful in 19s
Build and Deploy Backend / Build (Backend) (push) Has been cancelled
Build and Deploy Backend / Build Native Android App (EAS) (push) Has been cancelled
Build and Deploy Backend / Deploy to Host (push) Has been cancelled
Build and Deploy Backend / Build (Frontend Web) (push) Has been cancelled

This commit is contained in:
c-d-p
2025-05-01 14:47:03 +02:00
parent 7914be4f4d
commit 40da78d7cd
27 changed files with 1561 additions and 55 deletions

View File

@@ -0,0 +1,16 @@
# ./frontend/Dockerfile.nginx
FROM nginx:1.28-alpine
COPY nginx.conf /etc/nginx/conf.d/default.conf
# Remove default Nginx welcome page
RUN rm /usr/share/nginx/html/*
# Copy the pre-built Expo web output
COPY dist/ /usr/share/nginx/html
EXPOSE 80
# Start Nginx in the foreground
CMD ["nginx", "-g", "daemon off;"]

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 207 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 928 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

BIN
interfaces/nativeapp/dist/favicon.ico vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

37
interfaces/nativeapp/dist/index.html vendored Normal file
View File

@@ -0,0 +1,37 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta httpEquiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<title>MAIA</title>
<!-- The `react-native-web` recommended style reset: https://necolas.github.io/react-native-web/docs/setup/#root-element -->
<style id="expo-reset">
/* These styles make the body full-height */
html,
body {
height: 100%;
}
/* These styles disable body scrolling if you are using <ScrollView> */
body {
overflow: hidden;
}
/* These styles make the root element full-height */
#root {
display: flex;
height: 100%;
flex: 1;
}
</style>
<link rel="shortcut icon" href="/favicon.ico" /></head>
<body>
<!-- Use static rendering with Expo Router to support running without JavaScript. -->
<noscript>
You need to enable JavaScript to run this app.
</noscript>
<!-- The root element for your Expo app. -->
<div id="root"></div>
<script src="/_expo/static/js/web/index-0ef639b7ebb0f592fe73fd94db0b4205.js" defer></script>
</body>
</html>

View File

@@ -0,0 +1 @@
{"version":0,"bundler":"metro","fileMetadata":{}}

View File

@@ -0,0 +1,36 @@
server {
listen 80;
server_name app.maia.depaoli.id.au;
# Set the root directory for static files
root /usr/share/nginx/html;
# Default file to serve
index index.html index.htm;
location / {
# Crucial for SPAs:
# - Try to serve the requested file ($uri)
# - If it's not found, try it as a directory ($uri/)
# - If that's not found, serve index.html (letting client-side routing handle it)
try_files $uri $uri/ /index.html;
}
# Add gzip compression for better performance
gzip on;
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_types text/plain text/css text/xml application/json application/javascript application/xml+rss text/javascript image/svg+xml;
# Improve caching for assets
location ~* \.(?:css|js|jpg|jpeg|gif|png|ico|svg|woff|woff2|ttf|eot)$ {
expires 1y;
add_header Cache-Control "public";
access_log off; # Don't log access for static assets
}
# Deny access to hidden files
location ~ /\. {
deny all;
}
}