Skip to content

Commit

Permalink
feat: update Dockerfile for caching, enhance web app configuration, a…
Browse files Browse the repository at this point in the history
…nd update dependencies
  • Loading branch information
Robert27 committed Dec 15, 2024
1 parent 71c3a04 commit 2d4ad73
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 19 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ ENV EXPO_PUBLIC_NEULAND_GRAPHQL_ENDPOINT=${EXPO_PUBLIC_NEULAND_GRAPHQL_ENDPOINT}
ENV EXPO_PUBLIC_APTABASE_KEY=${EXPO_PUBLIC_APTABASE_KEY}
ENV NODE_ENV=production

RUN npx expo export -p web
RUN npx expo export -p web -c

# Final stage: Serve static files using npx serve
FROM node:23 AS final
Expand Down
8 changes: 8 additions & 0 deletions app.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,14 @@
"eas": {
"projectId": "b0ef9e3f-3115-44b0-abc7-99dd75821353"
}
},
"web": {
"favicon": "./src/assets/web/favicon.png",
"shortName": "Neuland Next",
"name": "Neuland Next - Deine inoffizielle App für die THI",
"description": "Neuland Next ist eine inoffizielle App für die Technische Hochschule Ingolstadt. Sie bietet dir alle Funktionen, die du für dein Studium benötigst, an einem Ort.",
"lang": "de",
"preferRelatedApplications": true
}
}
}
14 changes: 13 additions & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@ module.exports = function (api) {
api.cache(true)
return {
presets: ['babel-preset-expo'],
plugins: ['react-native-reanimated/plugin'],
plugins: [
['react-native-reanimated/plugin'],
[
'transform-inline-environment-variables',
{
include: [
'EXPO_PUBLIC_NEULAND_GRAPHQL_ENDPOINT',
'EXPO_PUBLIC_NEULAND_GRAPHQL_ENDPOINT',
'EXPO_PUBLIC_APTABASE_KEY',
],
},
],
],
}
}
Binary file modified bun.lockb
Binary file not shown.
13 changes: 0 additions & 13 deletions docker-compose.yml

This file was deleted.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@gorhom/bottom-sheet": "^5.0.6",
"@howljs/calendar-kit": "^2.2.1",
"@kichiyaki/react-native-barcode-generator": "^0.6.7",
"@maplibre/maplibre-react-native": "^10.0.0-beta.8",
"@maplibre/maplibre-react-native": "^10.0.0-beta.9",
"@react-native-community/datetimepicker": "8.2.0",
"@react-native-community/netinfo": "11.4.1",
"@react-navigation/native": "^7.0.14",
Expand Down Expand Up @@ -64,7 +64,7 @@
"expo-splash-screen": "~0.29.18",
"expo-system-ui": "~4.0.6",
"fuse.js": "^7.0.0",
"graphql": "^16.9.0",
"graphql": "^16.10.0",
"i18next": "^24.1.0",
"lucide-react-native": "^0.468.0",
"metro": "^0.81.0",
Expand Down Expand Up @@ -103,13 +103,14 @@
"zustand": "^5.0.2"
},
"devDependencies": {
"babel-plugin-transform-inline-environment-variables": "^0.4.4",
"@babel/core": "^7.26.0",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6",
"@babel/plugin-proposal-optional-chaining": "^7.21.0",
"@babel/plugin-transform-arrow-functions": "^7.25.9",
"@babel/plugin-transform-shorthand-properties": "^7.25.9",
"@babel/plugin-transform-template-literals": "^7.25.9",
"@commitlint/cli": "^19.6.0",
"@commitlint/cli": "^19.6.1",
"@commitlint/config-conventional": "^19.6.0",
"@expo/ngrok": "^4.1.3",
"@graphql-codegen/cli": "5.0.3",
Expand Down
4 changes: 3 additions & 1 deletion src/api/neuland-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ import {
UNIVERSITY_SPORTS_QUERY,
} from './gql-documents'

const GRAPHQL_ENDPOINT: string = 'https://api.neuland.app/graphql'
const GRAPHQL_ENDPOINT: string =
process.env.EXPO_PUBLIC_NEULAND_GRAPHQL_ENDPOINT ??
'https://api.neuland.app/graphql'
console.info('Using GraphQL endpoint:', GRAPHQL_ENDPOINT)
const ASSET_ENDPOINT: string = 'https://assets.neuland.app'
const USER_AGENT = `neuland.app-native/${packageInfo.version} (+${packageInfo.homepage})`
Expand Down
Binary file added src/assets/web/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/web/og-image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 2d4ad73

Please sign in to comment.