-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
164 changed files
with
7,095 additions
and
11,238 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 |
---|---|---|
@@ -1,28 +1,4 @@ | ||
{ | ||
"recommendations": [ | ||
"1000ch.svgo", | ||
"Angular.ng-template", | ||
"dbaeumer.vscode-eslint", | ||
"emeraldwalk.RunOnSave", | ||
"esbenp.prettier-vscode", | ||
"firsttris.vscode-jest-runner", | ||
"GitHub.vscode-pull-request-github", | ||
"Gruntfuggly.todo-tree", | ||
"humao.rest-client", | ||
"mhutchie.git-graph", | ||
"mongodb.mongodb-vscode", | ||
"ms-python.python", | ||
"mtxr.sqltools-driver-mysql", | ||
"mtxr.sqltools-driver-pg", | ||
"mtxr.sqltools", | ||
"nrwl.angular-console", | ||
"ritwickdey.LiveServer", | ||
"shengchen.vscode-checkstyle", | ||
"stkb.rewrap", | ||
"vmware.vscode-boot-dev-pack", | ||
"vscjava.vscode-gradle", | ||
"vscjava.vscode-java-pack", | ||
"webhint.vscode-webhint", | ||
"ms-playwright.playwright" | ||
] | ||
// Extensions should be defined in `.devcontainer/devcontainer.json` instead of here. | ||
"recommendations": [] | ||
} |
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
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,9 @@ | ||
import { mergeApplicationConfig, ApplicationConfig } from '@angular/core'; | ||
import { provideServerRendering } from '@angular/platform-server'; | ||
import { appConfig } from './app.config'; | ||
|
||
const serverConfig: ApplicationConfig = { | ||
providers: [provideServerRendering()], | ||
}; | ||
|
||
export const config = mergeApplicationConfig(appConfig, serverConfig); |
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,7 @@ | ||
import { bootstrapApplication } from '@angular/platform-browser'; | ||
import { AppComponent } from './app/app.component'; | ||
import { config } from './app/app.config.server'; | ||
|
||
const bootstrap = () => bootstrapApplication(AppComponent, config); | ||
|
||
export default bootstrap; |
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,10 @@ | ||
/* To learn more about this file see: https://angular.io/config/tsconfig. */ | ||
{ | ||
"extends": "./tsconfig.app.json", | ||
"compilerOptions": { | ||
"outDir": "../../out-tsc/server", | ||
"target": "es2019", | ||
"types": ["node"] | ||
}, | ||
"files": ["src/main.server.ts", "server.ts"] | ||
} |
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,4 +1,6 @@ | ||
API_URL="http://localhost:8082/api/v1" | ||
APP_VERSION="1.0.0-alpha" | ||
DATA_UPDATED_ON="2023-08-14" | ||
ENVIRONMENT="prod" | ||
CSR_API_URL="http://localhost:8082/api/v1" | ||
DATA_UPDATED_ON="2023-09-26" | ||
ENVIRONMENT="production" | ||
GOOGLE_TAG_MANAGER_ID="" | ||
SSR_API_URL="http://openchallenges-api-gateway:8082/api/v1" |
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,17 +1,24 @@ | ||
# Serve app with nginx server | ||
FROM nginx:1.23.2-alpine | ||
FROM node:20.7.0-alpine | ||
|
||
RUN apk add --no-cache jq | ||
ENV APP_DIR=/app | ||
|
||
COPY dist/apps/openchallenges/app/browser /usr/share/nginx/html | ||
COPY docker/nginx /etc/nginx/. | ||
COPY docker/10-envsubst-on-app-config-template.sh /docker-entrypoint.d/. | ||
RUN apk add --no-cache curl envsubst jq su-exec | ||
|
||
RUN chmod +x /docker-entrypoint.d/10-envsubst-on-app-config-template.sh | ||
WORKDIR / | ||
COPY apps/openchallenges/app/docker-entrypoint.sh . | ||
COPY apps/openchallenges/app/docker-entrypoint.d /docker-entrypoint.d | ||
RUN chmod +x docker-entrypoint.sh /docker-entrypoint.d/* | ||
|
||
WORKDIR ${APP_DIR} | ||
COPY dist/apps/openchallenges/app/browser/server ${APP_DIR} | ||
# The path of the destination folder must be the same as the path specified in server.ts. | ||
COPY dist/apps/openchallenges/app/browser/browser ${APP_DIR}/dist/apps/openchallenges/app/browser/browser | ||
|
||
HEALTHCHECK --interval=2s --timeout=3s --retries=20 --start-period=5s \ | ||
CMD curl --fail --silent "localhost:4200/health" | jq '.status' | grep UP || exit 1 | ||
|
||
EXPOSE 4200 | ||
|
||
CMD ["nginx", "-g", "daemon off;"] | ||
ENTRYPOINT ["/docker-entrypoint.sh"] | ||
|
||
CMD ["node", "main.js"] |
4 changes: 4 additions & 0 deletions
4
apps/openchallenges/app/docker-entrypoint.d/10-envsubst-on-app-config-template.sh
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,4 @@ | ||
#!/usr/bin/env sh | ||
|
||
cd "${APP_DIR}/dist/apps/openchallenges/app/browser/browser/config" | ||
envsubst < config.json.template > config.json |
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,11 @@ | ||
#!/usr/bin/env sh | ||
set -e | ||
|
||
/docker-entrypoint.d/10-envsubst-on-app-config-template.sh | ||
|
||
if [ "$1" = 'node' ]; then | ||
cd ${APP_DIR} | ||
exec su-exec node "$@" | ||
fi | ||
|
||
exec "$@" |
4 changes: 0 additions & 4 deletions
4
apps/openchallenges/app/docker/10-envsubst-on-app-config-template.sh
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
apps/openchallenges/app/docker/nginx/templates/events.conf.template
This file was deleted.
Oops, something went wrong.
30 changes: 0 additions & 30 deletions
30
apps/openchallenges/app/docker/nginx/templates/http.conf.template
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.