mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-12-28 22:31:15 +00:00
54edec8900
Signed-off-by: Claudius <opensource@amenthes.de>
2 KiB
2 KiB
Manual Installation
Requirements on your server
- Node.js 6.x or up (test up to 7.5.0) and <10.x
- Database (PostgreSQL, MySQL, MariaDB, SQLite, MSSQL) use charset
utf8
- npm (and its dependencies, node-gyp)
libssl-dev
for building scrypt (see here for further information)- For building CodiMD we recommend to use a machine with at least 2GB RAM
Instructions
- Download a release and unzip or clone into a directory
- Enter the directory and type
bin/setup
, which will install npm dependencies and create configs. The setup script is written in Bash, you would need bash as a prerequisite. - Setup the configs, see more below
- Setup environment variables which will overwrite the configs
- Build front-end bundle by
npm run build
(usenpm run dev
if you are in development) - Modify the file named
.sequelizerc
, change the value of the variableurl
with your db connection string For example:postgres://username:password@localhost:5432/codimd
- Run
node_modules/.bin/sequelize db:migrate
, this step will migrate your db to the latest schema - Run the server as you like (node, forever, pm2)
How to upgrade your installation
⚠️ When you are still running from the old repository, please run: git remote set-url origin https://github.com/codimd/server.git
⚠️
If you are upgrading CodiMD from an older version, follow these steps:
- Fully stop your old server first (important)
git pull
or do whatever that updates the filesnpm install
to update dependencies- Build front-end bundle by
npm run build
(usenpm run dev
if you are in development) - Modify the file named
.sequelizerc
, change the value of the variableurl
with your db connection string For example:postgres://username:password@localhost:5432/codimd
- Run
node_modules/.bin/sequelize db:migrate
, this step will migrate your db to the latest schema - Start your whole new server!