1
0

Merge pull request #35 from ahmednreldin/main

Docker distribution
This commit is contained in:
Zef Hemel 2022-07-18 20:26:27 +02:00 committed by GitHub
commit 6bcc37fde1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 41 additions and 0 deletions

2
.env Normal file
View File

@ -0,0 +1,2 @@
DIRECTORY=
PORT=3000

12
Dockerfile Normal file
View File

@ -0,0 +1,12 @@
FROM node:18.6.0-slim
RUN mkdir /space
RUN chown node:node /space
USER node
WORKDIR /space
RUN npx --yes @silverbulletmd/server || true
EXPOSE 3000
CMD ["sh","-c","npx --yes @silverbulletmd/server --port 3000 /space"]

View File

@ -37,6 +37,22 @@ More documentation can be found in the [docs space](https://github.com/zefhemel/
* **Extensible** through plugs. * **Extensible** through plugs.
## Installing and running Silver Bullet ## Installing and running Silver Bullet
## Start with docker
First you have to clone the repo, then configure your port, space/directory in .env file
then run
```
docker compose up
```
then open your browser and ROCK!
e.g.
```
localhost:PORT
```
## Start without docker
To run a release version, you need to have a recent version of npm (8+) and node.js (16+) installed as well as some basic build infrastructure (make, cpp). Silver Bullet has only been tested on MacOS and Linux thus far. To run a release version, you need to have a recent version of npm (8+) and node.js (16+) installed as well as some basic build infrastructure (make, cpp). Silver Bullet has only been tested on MacOS and Linux thus far.
To install and run, create a folder for your pages (can be empty or an existing folder with `.md` files) and run: To install and run, create a folder for your pages (can be empty or an existing folder with `.md` files) and run:

11
docker-compose.yaml Normal file
View File

@ -0,0 +1,11 @@
services:
sb:
build: ./
image: sb
container_name: sb
ports:
- ${PORT}:3000
volumes:
- type: bind
source: ${DIRECTORY}
target: /space