diff --git a/Dockerfile b/Dockerfile index a6a49d7cd..995102f2e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,20 @@ FROM node:14-alpine as builder -# build application and add additional files + +# Build application and add additional files + WORKDIR /ghostfolio -# only add basic files without application itself to avoid rebuilding layers when package.json, etc. did not change + +# Only add basic files without the application itself to avoid rebuilding +# layers when files (package.json etc.) have not changed +COPY ./CHANGELOG.md CHANGELOG.md +COPY ./LICENSE LICENSE COPY ./package.json package.json COPY ./yarn.lock yarn.lock COPY ./prisma/schema.prisma prisma/schema.prisma RUN yarn -# see https://github.com/nrwl/nx/issues/6586 for further details +# See https://github.com/nrwl/nx/issues/6586 for further details COPY ./decorate-angular-cli.js decorate-angular-cli.js RUN node decorate-angular-cli.js @@ -23,19 +29,21 @@ COPY ./apps apps RUN yarn build:all -# Prepare dist image with additional node_modules +# Prepare the dist image with additional node_modules WORKDIR /ghostfolio/dist/apps/api -# package.json was generated by build process, however the yarn.lock need to be used from the original to ensure same versions +# package.json was generated by the build process, however the original +# yarn.lock needs to be used to ensure the same versions COPY ./yarn.lock /ghostfolio/dist/apps/api/yarn.lock RUN yarn COPY prisma /ghostfolio/dist/apps/api/prisma -# Overwrite generated package.json with original to ensure we have all the scripts +# Overwrite the generated package.json with the original one to ensure having +# all the scripts COPY package.json /ghostfolio/dist/apps/api RUN yarn database:generate-typings -# Image to start, copy everything needed from builder +# Image to run, copy everything needed from builder FROM node:14-alpine COPY --from=builder /ghostfolio/dist/apps /ghostfolio/apps WORKDIR /ghostfolio/apps/api diff --git a/README.md b/README.md index 119ec849c..a4ed80f52 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ Our official **[Ghostfolio Premium](https://ghostfol.io/pricing)** cloud offering is the easiest way to get started. Due to the time it saves, this will be the best option for most people. The revenue is used for covering the hosting costs. -If you prefer to run Ghostfolio on your own infrastructure, please find the source code and further instructions here on _GitHub_ or use the [setup](https://github.com/psychowood/ghostfolio-docker) by [psychowood](https://github.com/psychowood). +If you prefer to run Ghostfolio on your own infrastructure, please find further instructions in the section [Run with Docker](#run-with-docker). ## Why Ghostfolio? @@ -87,26 +87,26 @@ The frontend is built with [Angular](https://angular.io) and uses [Angular Mater - [Docker](https://www.docker.com/products/docker-desktop) -### Setup +### Setup Docker Image -To run it with docker you can simply execute: +Run the following commands to build and start the Docker image: ```bash docker-compose -f docker/docker-compose-build-local.yml build docker-compose -f docker/docker-compose-build-local.yml up ``` -This will build a docker image of ghostfolio locally on your machine and start it up, including dependencies and the database. - -### Initialize the Database +### Setup Database -To initialize the database, you can run the following command once ghostfolio is started: +Run the following command to setup the database once Ghostfolio is running: ```bash docker-compose -f docker/docker-compose-build-local.yml exec ghostfolio yarn setup:database ``` -After this, go to http://localhost:3333/ and follow those steps: +### Fetch Historical Data + +Open http://localhost:3333 in your browser and accomplish these steps: 1. Login as _Admin_ with the following _Security Token_: `ae76872ae8f3419c6d6f64bf51888ecbcc703927a342d815fafe486acdb938da07d0cf44fca211a0be74a423238f535362d390a41e81e633a9ce668a6e31cdf9` 1. Go to the _Admin Control Panel_ and click _Gather All Data_ to fetch historical data @@ -116,9 +116,9 @@ After this, go to http://localhost:3333/ and follow those steps: ### Prerequisites +- [Docker](https://www.docker.com/products/docker-desktop) - [Node.js](https://nodejs.org/en/download) (version 14+) - [Yarn](https://yarnpkg.com/en/docs/install) -- [Docker](https://www.docker.com/products/docker-desktop) ### Setup @@ -132,14 +132,14 @@ After this, go to http://localhost:3333/ and follow those steps: 1. Go to the _Admin Control Panel_ and click _Gather All Data_ to fetch historical data 1. Click _Sign out_ and check out the _Live Demo_ -### Start server +### Start Server
  1. Debug: Run yarn watch:server and click "Launch Program" in Visual Studio Code
  2. Serve: Run yarn start:server
-### Start client +### Start Client Run `yarn start:client` diff --git a/angular.json b/angular.json index d26410104..f22cb2008 100644 --- a/angular.json +++ b/angular.json @@ -100,12 +100,12 @@ { "glob": "CHANGELOG.md", "input": "", - "output": "./" + "output": "./assets" }, { "glob": "LICENSE", "input": "", - "output": "./" + "output": "./assets" }, { "glob": "robots.txt", diff --git a/apps/client/src/app/pages/about/about-page.html b/apps/client/src/app/pages/about/about-page.html index 503f7c738..beff9cf75 100644 --- a/apps/client/src/app/pages/about/about-page.html +++ b/apps/client/src/app/pages/about/about-page.html @@ -198,7 +198,7 @@

Changelog

- + @@ -209,7 +209,7 @@

License

- +