mirror of
https://github.com/osmarks/mycorrhiza.git
synced 2024-12-11 21:10:26 +00:00
parent
9cb552fa72
commit
8bd00c7f37
18
Dockerfile
Normal file
18
Dockerfile
Normal file
@ -0,0 +1,18 @@
|
||||
FROM golang:alpine as build
|
||||
WORKDIR src
|
||||
COPY . .
|
||||
ENV CGO_ENABLED=0
|
||||
RUN go generate
|
||||
RUN go build -o /out/mycorrhiza .
|
||||
|
||||
FROM alpine/git as app
|
||||
EXPOSE 1737
|
||||
|
||||
WORKDIR /
|
||||
RUN mkdir wiki
|
||||
COPY --from=build /out/mycorrhiza /usr/bin
|
||||
|
||||
WORKDIR /wiki
|
||||
VOLUME /wiki
|
||||
ENTRYPOINT ["mycorrhiza"]
|
||||
CMD ["/wiki"]
|
30
README.md
30
README.md
@ -8,12 +8,42 @@ See [the guide](https://mycorrhiza.lesarbr.es/hypha/guide/deployment) on the wik
|
||||
|
||||
## Installing
|
||||
|
||||
### Pacman
|
||||
|
||||
If you use a linux distro with pacman package manager (Arch, Manjaro, Garuda, etc) you can install it using PKGBUILD:
|
||||
```sh
|
||||
$ wget https://raw.githubusercontent.com/bouncepaw/mycorrhiza/master/PKGBUILD
|
||||
$ makepkg --install
|
||||
```
|
||||
|
||||
### Docker
|
||||
|
||||
You can run Mycorrhiza Wiki in Docker using Dockerfile provided by this repository. Clone the repo and build the image:
|
||||
```sh
|
||||
$ git clone https://github.com/bouncepaw/mycorrhiza/
|
||||
$ docker build -t mycorrhiza .
|
||||
```
|
||||
|
||||
Now you can create a new Mycorrhiza Wiki container using this command:
|
||||
```sh
|
||||
$ docker run -v /full/path/to/my/wiki:/wiki -p 1737:1737 mycorrhiza
|
||||
```
|
||||
|
||||
Example:
|
||||
```sh
|
||||
$ cd /dev/shm
|
||||
$ git clone https://github.com/bouncepaw/mycorrhiza/
|
||||
$ docker build -t mycorrhiza .
|
||||
$ git clone https://github.com/bouncepaw/example-wiki
|
||||
$ docker run -v /dev/shm/example-wiki:/wiki -p 1737:1737 mycorrhiza
|
||||
```
|
||||
|
||||
Example 2:
|
||||
```sh
|
||||
...
|
||||
$ docker run -v /dev/shm/:/config -v /dev/shm/example-wiki:/wiki -p 80:1737 mycorrhiza -config-path /config/myconfig.ini /wiki
|
||||
```
|
||||
|
||||
## Usage
|
||||
```
|
||||
mycorrhiza [OPTIONS...] WIKI_PATH
|
||||
|
Loading…
Reference in New Issue
Block a user