Browse Source

Improve documentation and fix changelog and license

pull/431/head
Thomas 4 years ago
parent
commit
4b9deef3e3
  1. 22
      Dockerfile
  2. 22
      README.md
  3. 4
      angular.json
  4. 4
      apps/client/src/app/pages/about/about-page.html

22
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

22
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
<ol type="a">
<li>Debug: Run <code>yarn watch:server</code> and click "Launch Program" in <a href="https://code.visualstudio.com">Visual Studio Code</a></li>
<li>Serve: Run <code>yarn start:server</code></li>
</ol>
### Start client
### Start Client
Run `yarn start:client`

4
angular.json

@ -100,12 +100,12 @@
{
"glob": "CHANGELOG.md",
"input": "",
"output": "./"
"output": "./assets"
},
{
"glob": "LICENSE",
"input": "",
"output": "./"
"output": "./assets"
},
{
"glob": "robots.txt",

4
apps/client/src/app/pages/about/about-page.html

@ -198,7 +198,7 @@
<h3 class="mb-3 text-center" i18n>Changelog</h3>
<mat-card class="changelog">
<mat-card-content>
<markdown [src]="'CHANGELOG.md'"></markdown>
<markdown [src]="'assets/CHANGELOG.md'"></markdown>
</mat-card-content>
</mat-card>
</div>
@ -209,7 +209,7 @@
<h3 class="mb-3 text-center" i18n>License</h3>
<mat-card>
<mat-card-content>
<markdown [src]="'LICENSE'"></markdown>
<markdown [src]="'assets/LICENSE'"></markdown>
</mat-card-content>
</mat-card>
</div>

Loading…
Cancel
Save