Merge pull request #997 from hedgedoc/docs/remove_sequelizerc

This commit is contained in:
David Mehren 2021-03-06 17:31:11 +01:00 committed by GitHub
commit d764b696df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 8 additions and 32 deletions

View file

@ -1,8 +0,0 @@
var path = require('path');
module.exports = {
'config': path.resolve('config.json'),
'migrations-path': path.resolve('lib', 'migrations'),
'models-path': path.resolve('lib', 'models'),
'url': 'change this'
}

View file

@ -2,18 +2,6 @@
set -e set -e
cat << EOF > .sequelizerc
var path = require('path');
module.exports = {
'config': path.resolve('config.json'),
'migrations-path': path.resolve('lib', 'migrations'),
'models-path': path.resolve('lib', 'models'),
'url': process.env.DATABASE_URL
}
EOF
cat << EOF > config.json cat << EOF > config.json
{ {

View file

@ -46,10 +46,6 @@ if [ ! -f config.json ]; then
cp config.json.example config.json cp config.json.example config.json
fi fi
if [ ! -f .sequelizerc ]; then
cp .sequelizerc.example .sequelizerc
fi
echo "Installing packages..." echo "Installing packages..."
yarn install --pure-lockfile yarn install --pure-lockfile
yarn install --production=false --pure-lockfile yarn install --production=false --pure-lockfile
@ -58,10 +54,9 @@ cat << EOF
Edit the following config file to setup HedgeDoc server and client. Edit the following config file to setup HedgeDoc server and client.
Read more info at https://github.com/hedgedoc/hedgedoc#configuration-files Read more info at https://docs.hedgedoc.org/configuration/
* config.json -- HedgeDoc config * config.json -- HedgeDoc config
* .sequelizerc -- db config
EOF EOF
# change directory back # change directory back

View file

@ -24,12 +24,8 @@
4. Modify the file named `config.json` or configure HedgeDoc through environment variables which will overwrite the configs, see docs [here](../configuration.md). 4. Modify the file named `config.json` or configure HedgeDoc through environment variables which will overwrite the configs, see docs [here](../configuration.md).
5. **If using the release tarball for 1.7.0 or newer, this step can be skipped.** 5. **If using the release tarball for 1.7.0 or newer, this step can be skipped.**
Build the frontend bundle by `yarn run build` (use `yarn run dev` if you are in development) Build the frontend bundle by `yarn run build` (use `yarn run dev` if you are in development)
6. Modify the file named `.sequelizerc`, change the value of the variable `url` to your db connection string. For example: 6. It is recommended to start your server manually once: `NODE_ENV=production yarn start`, this way it's easier to see warnings or errors that might occur (leave out `NODE_ENV=production` for development).
- `postgres://username:password@localhost:5432/hedgedoc` 7. Run the server as you like (node, forever, pm2, SystemD, Init-Scripts)
- `mysql://username:password@localhost:3306/hedgedoc`
- `sqlite:///opt/hedgedoc/hedgedoc.sqlite` (note that you need to use an absolute path to the SQLite file)
7. It is recommended to start your server manually once: `NODE_ENV=production yarn start`, this way it's easier to see warnings or errors that might occur (leave out `NODE_ENV=production` for development).
8. Run the server as you like (node, forever, pm2, SystemD, Init-Scripts)
## How to upgrade your installation ## How to upgrade your installation

View file

@ -1,4 +1,9 @@
# Release Notes # Release Notes
## <i class="fa fa-tag"></i> 1.8.0 <i class="fa fa-calendar-o"></i> UNRELEASED
### Features
- Database migrations are now automatically applied on application startup.
The separate `.sequelizerc` configuration file is no longer necessary and can be safely deleted.
## <i class="fa fa-tag"></i> 1.7.2 <i class="fa fa-calendar-o"></i> 2021-01-15 ## <i class="fa fa-tag"></i> 1.7.2 <i class="fa fa-calendar-o"></i> 2021-01-15
This release fixes a security issue. We recommend upgrading as soon as possible. This release fixes a security issue. We recommend upgrading as soon as possible.
### Security Fixes ### Security Fixes