Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:kerriestauffer/indiv-berner-rundgae…
…nge into main
- Loading branch information
Showing
18 changed files
with
371 additions
and
110 deletions.
There are no files selected for viewing
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# We label the images in order to easily clear them after. | ||
# clear images with `docker image prune --filter label=stage=build`. | ||
# to look which ones are there: `docker image ls --filter label=stage=build`. | ||
|
||
# We may not use the alpine image since it uses musl but our production image may need another c standard lib. | ||
FROM node:19 as build | ||
LABEL stage=build | ||
|
||
COPY backend/ /build/backend | ||
COPY frontend /build/frontend | ||
|
||
WORKDIR /build/backend | ||
|
||
RUN npm install && npm run build | ||
|
||
WORKDIR /build/frontend | ||
|
||
RUN npm install && npm run build | ||
|
||
FROM node:19 as prod | ||
|
||
COPY --from=build /build/backend/build /app/dist | ||
|
||
COPY --from=build /build/backend/node_modules/ /app/dist/node_modules | ||
|
||
COPY --from=build /build/frontend/client /app/client | ||
|
||
WORKDIR /app/dist/ | ||
|
||
CMD ["node", "main.js"] |
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 +1,36 @@ | ||
# indiv-berner-rundgaenge | ||
# indiv-berner-rundgaenge | ||
|
||
To install all the dependencies, run the script: | ||
|
||
```sh | ||
./setup.sh | ||
``` | ||
|
||
# frontend | ||
|
||
The frontend is an [angular](https://angular.io/) single page application. | ||
|
||
It needs a build step for two reasons: | ||
|
||
- To turn the angular code into a bundle that can be served by a web server | ||
- To turn typescript code into pure javascript code that runs in the browser | ||
|
||
To start it, do the following: | ||
|
||
```sh | ||
cd frontend | ||
npm run start | ||
``` | ||
|
||
# backend | ||
|
||
The backend is a [nest](https://nestjs.com/) node application. | ||
|
||
It needs a build step to transpile typescript into javascript. | ||
|
||
To start it, do the following: | ||
|
||
```sh | ||
cd backend | ||
npm run start:dev # will also start a mongo database in a docker container | ||
``` |
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,6 @@ | ||
# Development config | ||
PRODUCTION=false # Sets some prod specific things and makes seeding impossible | ||
SEED_MONGO=false # Seeds the mongo database | ||
MONGO_URL=/ | ||
#PORT=3000 # Optional | ||
#API_PREFIX=api # Optional |
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Oops, something went wrong.