Feature/extend documentation for self hosting (#565)

* Extend documentation for self-hosting

* Add tag "latest" to docker image

* Update changelog
pull/566/head
Thomas Kaul 2 years ago committed by GitHub
parent 9f545e3e2b
commit ed1136999a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Added support for cryptocurrency _Solana_ (`SOL-USD`)
- Extended the documentation for self-hosting with the [official Ghostfolio Docker image](https://hub.docker.com/r/ghostfolio/ghostfolio)
### Fixed

@ -81,19 +81,27 @@ The backend is based on [NestJS](https://nestjs.com) using [PostgreSQL](https://
The frontend is built with [Angular](https://angular.io) and uses [Angular Material](https://material.angular.io) with utility classes from [Bootstrap](https://getbootstrap.com).
## Run with Docker
## Run with Docker (self-hosting)
### Prerequisites
- [Docker](https://www.docker.com/products/docker-desktop)
### Setup Docker Image
### a. Run environment
Run the following commands to build and start the Docker image:
Run the following command to start the Docker images from [Docker Hub](https://hub.docker.com/r/ghostfolio/ghostfolio):
```bash
docker-compose -f docker/docker-compose-build-local.yml build
docker-compose -f docker/docker-compose-build-local.yml up
docker-compose -f docker/docker-compose.yml up
```
### b. Build and run environment
Run the following commands to build and start the Docker images:
```bash
docker-compose -f docker/docker-compose.build.yml build
docker-compose -f docker/docker-compose.build.yml up
```
### Setup Database
@ -112,6 +120,12 @@ Open http://localhost:3333 in your browser and accomplish these 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_
### Finalization
1. Create a new user via _Get Started_
1. Assign the role `ADMIN` to this user (directly in the database)
1. Delete the original _Admin_ (directly in the database)
### Migrate Database
With the following command you can keep your database schema in sync after a Ghostfolio version update:

@ -1,5 +1,15 @@
version: '3.7'
services:
ghostfolio:
build: ../
env_file:
- ../.env
environment:
DATABASE_URL: postgresql://user:password@postgres:5432/ghostfolio-db?sslmode=prefer
REDIS_HOST: 'redis'
ports:
- 3333:3333
postgres:
image: postgres:12
env_file:
@ -10,15 +20,5 @@ services:
redis:
image: 'redis:alpine'
ghostfolio:
build: ../
env_file:
- ../.env
environment:
REDIS_HOST: 'redis'
DATABASE_URL: postgresql://user:password@postgres:5432/ghostfolio-db?sslmode=prefer
ports:
- 3333:3333
volumes:
postgres:

@ -0,0 +1,22 @@
version: '3.7'
services:
postgres:
image: postgres:12
container_name: postgres
restart: unless-stopped
ports:
- 5432:5432
env_file:
- ../.env
volumes:
- postgres:/var/lib/postgresql/data
redis:
image: 'redis:alpine'
container_name: redis
restart: unless-stopped
ports:
- 6379:6379
volumes:
postgres:

@ -1,11 +1,17 @@
version: '3.7'
services:
ghostfolio:
image: ghostfolio/ghostfolio
env_file:
- ../.env
environment:
DATABASE_URL: postgresql://user:password@postgres:5432/ghostfolio-db?sslmode=prefer
REDIS_HOST: 'redis'
ports:
- 3333:3333
postgres:
image: postgres:12
container_name: postgres
restart: unless-stopped
ports:
- 5432:5432
env_file:
- ../.env
volumes:
@ -13,10 +19,6 @@ services:
redis:
image: 'redis:alpine'
container_name: redis
restart: unless-stopped
ports:
- 6379:6379
volumes:
postgres:

@ -1,5 +1,5 @@
set -xe
echo "$DOCKER_HUB_ACCESS_TOKEN" | docker login -u "$DOCKER_HUB_USERNAME" --password-stdin
docker build -t ghostfolio/ghostfolio:$TRAVIS_TAG .
docker push ghostfolio/ghostfolio:$TRAVIS_TAG
docker build -t ghostfolio/ghostfolio:$TRAVIS_TAG -t ghostfolio/ghostfolio:latest .
docker push ghostfolio/ghostfolio --all-tags

Loading…
Cancel
Save