-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Chore: Add better referencing of runtime variables (#182)
- Loading branch information
1 parent
c942e77
commit d5eeaad
Showing
7 changed files
with
106 additions
and
59 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/.github | ||
/.serverless | ||
|
||
# See http://help.github.com/ignore-files/ for more about ignoring files. | ||
|
||
# Compiled output | ||
/dist | ||
/tmp | ||
/out-tsc | ||
/bazel-out | ||
|
||
# Node | ||
/node_modules | ||
npm-debug.log | ||
yarn-error.log | ||
|
||
# IDEs and editors | ||
.idea/ | ||
.project | ||
.classpath | ||
.c9/ | ||
*.launch | ||
.settings/ | ||
*.sublime-workspace | ||
|
||
# Visual Studio Code | ||
.vscode/* | ||
!.vscode/settings.json | ||
!.vscode/tasks.json | ||
!.vscode/launch.json | ||
!.vscode/extensions.json | ||
.history/* | ||
|
||
# Miscellaneous | ||
/.angular/cache | ||
.sass-cache/ | ||
/connect.lock | ||
/coverage | ||
/libpeerconnection.log | ||
testem.log | ||
/typings | ||
|
||
# System files | ||
.DS_Store | ||
Thumbs.db |
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 |
---|---|---|
@@ -1,16 +1,14 @@ | ||
FROM nginx | ||
|
||
RUN apt-get update && \ | ||
apt-get -y install nodejs npm && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* && \ | ||
npm install --global yarn | ||
FROM node:20 as build | ||
|
||
ENV NG_CLI_ANALYTICS="false" | ||
|
||
COPY . /app | ||
WORKDIR /app | ||
RUN yarn install | ||
RUN yarn build | ||
|
||
FROM nginx | ||
|
||
COPY nginx.conf /etc/nginx/conf.d/default.conf | ||
COPY docker-build.sh /docker-entrypoint.d/99-docker-build.sh | ||
|
||
RUN yarn install | ||
COPY --from=build /app/dist/FediseerGUI/browser /usr/share/nginx/html |
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
Empty file.
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,13 +1,21 @@ | ||
import {FilterSpecialValueAllInstances} from "../app/shared/constants"; | ||
|
||
function getEnvironmentVariable<T>(variable: string, defaultValue: T): T { | ||
if (typeof (<any>window)[variable] === 'undefined') { | ||
return defaultValue; | ||
} | ||
|
||
return <T>(<any>window)[variable]; | ||
} | ||
|
||
export const environment = { | ||
apiUrl: 'https://fediseer.com/api', | ||
apiVersion: 'v1', | ||
appName: 'FediseerGUI', | ||
appVersion: '0.18.1', | ||
maintainer: '@[email protected]', | ||
defaultCensuresListInstanceFilter: [FilterSpecialValueAllInstances], | ||
sourceCodeLink: 'https://github.com/Fediseer/FediseerGUI', | ||
donateLink: 'https://liberapay.com/Fediseer/', | ||
apiUrl: getEnvironmentVariable('FEDISEER_API_URL', 'https://fediseer.com/api'), | ||
apiVersion: getEnvironmentVariable('FEDISEER_API_VERSION', 'v1'), | ||
appName: getEnvironmentVariable('FEDISEER_APP_NAME', 'FediseerGUI'), | ||
appVersion: getEnvironmentVariable('FEDISEER_APP_VERSION', '0.18.1'), | ||
maintainer: getEnvironmentVariable('FEDISEER_APP_MAINTAINER', '@[email protected]'), | ||
defaultCensuresListInstanceFilter: getEnvironmentVariable('FEDISEER_DEFAULT_CENSURE_LIST_FILTER_INSTANCES', [FilterSpecialValueAllInstances]), | ||
sourceCodeLink: getEnvironmentVariable('FEDISEER_SOURCE_CODE_LINK', 'https://github.com/Fediseer/FediseerGUI'), | ||
donateLink: getEnvironmentVariable('FEDISEER_DONATE_LINK', 'https://liberapay.com/Fediseer/'), | ||
production: true, | ||
}; |
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