-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: UI docker, @hikers-book/cli-tools, @hikers-book/config, angula…
…r improves
- Loading branch information
1 parent
ee8ac41
commit cb4877b
Showing
75 changed files
with
10,892 additions
and
15,501 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,5 @@ | ||
*/coverage | ||
*/dist | ||
*/node_modules | ||
*/.DS_Store | ||
*/**/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,24 @@ | ||
FROM node:18 as build-stage | ||
ENV PNPM_HOME="/pnpm" | ||
ENV PATH="$PNPM_HOME:$PATH" | ||
RUN corepack enable | ||
RUN pnpm install -g @angular/cli | ||
|
||
WORKDIR /app | ||
|
||
COPY package.json . | ||
COPY pnpm-lock.yaml . | ||
COPY pnpm-workspace.yaml . | ||
COPY tsconfig.json . | ||
|
||
COPY ui/hikers-book/package.json ui/hikers-book/package.json | ||
|
||
RUN pnpm --filter hikers-book-ui install | ||
|
||
COPY ui/hikers-book ui/hikers-book | ||
|
||
RUN pnpm --filter hikers-book-ui run build | ||
|
||
FROM nginx:1.25 | ||
COPY --from=build-stage /app/ui/hikers-book/dist/ /usr/share/nginx/html | ||
COPY ./docker/nginx/hikers-book.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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,5 @@ | |
Memories, guides, tips, gearlists and many more! | ||
|
||
**Work in progress !!!** | ||
|
||
[Documentation](./docs/Readme.md) |
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 @@ | ||
config/*.json |
File renamed without changes.
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 was deleted.
Oops, something went wrong.
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
This file was deleted.
Oops, something went wrong.
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,10 @@ | ||
// @tsed/cli do not edit | ||
import defaultConfig from './default.config'; | ||
import cfg from 'config'; | ||
import { ConnectOptions } from 'mongoose'; | ||
|
||
export default [defaultConfig]; | ||
export default [ | ||
{ | ||
id: 'hikers-book', | ||
url: cfg.get<string>('mongodb.url'), | ||
connectionOptions: cfg.get<ConnectOptions>('mongodb.connectionOptions') | ||
} | ||
]; |
This file was deleted.
Oops, something went wrong.
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,5 +1 @@ | ||
/** | ||
* @file Automatically generated by barrelsby. | ||
*/ | ||
|
||
export * from './IndexController'; | ||
export default {}; |
Empty file.
This file was deleted.
Oops, something went wrong.
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,12 @@ | ||
db.createUser( | ||
{ | ||
user: "hiker", | ||
pwd: "hikers_password", | ||
roles: [ | ||
{ | ||
role: "readWrite", | ||
db: "hikers-book" | ||
} | ||
] | ||
} | ||
); |
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,35 @@ | ||
# Browser preferred language detection (does NOT require | ||
# AcceptLanguageModule) | ||
map $http_accept_language $accept_language { | ||
~*^cs cs; | ||
~*^en-US en-US; | ||
~*^sk sk; | ||
} | ||
|
||
server { | ||
listen 80; | ||
root /usr/share/nginx/html; | ||
|
||
# Fallback to default language if no preference defined by browser | ||
if ($accept_language ~ "^$") { | ||
set $accept_language "en-US"; | ||
} | ||
|
||
# Redirect "/" to Angular application in the preferred language of the browser | ||
rewrite ^/$ /$accept_language permanent; | ||
|
||
# mount config as volume only once to root, not to each language | ||
location ~ /assets/config.json$ { | ||
try_files $uri /config.json; | ||
} | ||
|
||
# Everything under the Angular application is always redirected to Angular in the | ||
# correct language | ||
location ~ ^/(cs|en-US|sk) { | ||
try_files $uri /$1/index.html?$args; | ||
} | ||
|
||
location / { | ||
try_files $uri /$accept_language/index.html?$args; | ||
} | ||
} |
Oops, something went wrong.