several doc fixes
This commit is contained in:
parent
7896d2eef7
commit
3702bc8413
10 changed files with 32 additions and 24 deletions
6
.github/workflows/development.yml
vendored
6
.github/workflows/development.yml
vendored
|
@ -32,14 +32,14 @@ jobs:
|
||||||
|
|
||||||
- name: Build for Linux/macOS
|
- name: Build for Linux/macOS
|
||||||
if: startsWith(matrix.os, 'windows-') != true
|
if: startsWith(matrix.os, 'windows-') != true
|
||||||
run: go build -i -ldflags "-s -w -X github.com/drakkan/sftpgo/version.commit=`git describe --always --dirty` -X github.com/drakkan/sftpgo/version.date=`date -u +%FT%TZ`" -o sftpgo
|
run: go build -ldflags "-s -w -X github.com/drakkan/sftpgo/version.commit=`git describe --always --dirty` -X github.com/drakkan/sftpgo/version.date=`date -u +%FT%TZ`" -o sftpgo
|
||||||
|
|
||||||
- name: Build for Windows
|
- name: Build for Windows
|
||||||
if: startsWith(matrix.os, 'windows-')
|
if: startsWith(matrix.os, 'windows-')
|
||||||
run: |
|
run: |
|
||||||
$GIT_COMMIT = (git describe --always --dirty) | Out-String
|
$GIT_COMMIT = (git describe --always --dirty) | Out-String
|
||||||
$DATE_TIME = ([datetime]::Now.ToUniversalTime().toString("yyyy-MM-ddTHH:mm:ssZ")) | Out-String
|
$DATE_TIME = ([datetime]::Now.ToUniversalTime().toString("yyyy-MM-ddTHH:mm:ssZ")) | Out-String
|
||||||
go build -i -ldflags "-s -w -X github.com/drakkan/sftpgo/version.commit=$GIT_COMMIT -X github.com/drakkan/sftpgo/version.date=$DATE_TIME" -o sftpgo.exe
|
go build -ldflags "-s -w -X github.com/drakkan/sftpgo/version.commit=$GIT_COMMIT -X github.com/drakkan/sftpgo/version.date=$DATE_TIME" -o sftpgo.exe
|
||||||
|
|
||||||
- name: Initialize data provider
|
- name: Initialize data provider
|
||||||
run: ./sftpgo initprovider
|
run: ./sftpgo initprovider
|
||||||
|
@ -142,7 +142,7 @@ jobs:
|
||||||
go-version: 1.14
|
go-version: 1.14
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: go build -i -ldflags "-s -w -X github.com/drakkan/sftpgo/version.commit=`git describe --always --dirty` -X github.com/drakkan/sftpgo/version.date=`date -u +%FT%TZ`" -o sftpgo
|
run: go build -ldflags "-s -w -X github.com/drakkan/sftpgo/version.commit=`git describe --always --dirty` -X github.com/drakkan/sftpgo/version.date=`date -u +%FT%TZ`" -o sftpgo
|
||||||
|
|
||||||
- name: Run tests using PostgreSQL provider
|
- name: Run tests using PostgreSQL provider
|
||||||
run: |
|
run: |
|
||||||
|
|
8
.github/workflows/release.yml
vendored
8
.github/workflows/release.yml
vendored
|
@ -102,14 +102,14 @@ jobs:
|
||||||
|
|
||||||
- name: Build for Linux/macOS
|
- name: Build for Linux/macOS
|
||||||
if: startsWith(matrix.os, 'windows-') != true
|
if: startsWith(matrix.os, 'windows-') != true
|
||||||
run: go build -i -ldflags "-s -w -X github.com/drakkan/sftpgo/version.commit=`git describe --always --dirty` -X github.com/drakkan/sftpgo/version.date=`date -u +%FT%TZ`" -o sftpgo
|
run: go build -ldflags "-s -w -X github.com/drakkan/sftpgo/version.commit=`git describe --always --dirty` -X github.com/drakkan/sftpgo/version.date=`date -u +%FT%TZ`" -o sftpgo
|
||||||
|
|
||||||
- name: Build for Windows
|
- name: Build for Windows
|
||||||
if: startsWith(matrix.os, 'windows-')
|
if: startsWith(matrix.os, 'windows-')
|
||||||
run: |
|
run: |
|
||||||
$GIT_COMMIT = (git describe --always --dirty) | Out-String
|
$GIT_COMMIT = (git describe --always --dirty) | Out-String
|
||||||
$DATE_TIME = ([datetime]::Now.ToUniversalTime().toString("yyyy-MM-ddTHH:mm:ssZ")) | Out-String
|
$DATE_TIME = ([datetime]::Now.ToUniversalTime().toString("yyyy-MM-ddTHH:mm:ssZ")) | Out-String
|
||||||
go build -i -ldflags "-s -w -X github.com/drakkan/sftpgo/version.commit=$GIT_COMMIT -X github.com/drakkan/sftpgo/version.date=$DATE_TIME" -o sftpgo.exe
|
go build -ldflags "-s -w -X github.com/drakkan/sftpgo/version.commit=$GIT_COMMIT -X github.com/drakkan/sftpgo/version.date=$DATE_TIME" -o sftpgo.exe
|
||||||
|
|
||||||
- name: Initialize data provider
|
- name: Initialize data provider
|
||||||
run: ./sftpgo initprovider
|
run: ./sftpgo initprovider
|
||||||
|
@ -160,9 +160,9 @@ jobs:
|
||||||
cp -r templates output/
|
cp -r templates output/
|
||||||
if [ $OS == 'linux' ]
|
if [ $OS == 'linux' ]
|
||||||
then
|
then
|
||||||
cp -r init/sftpgo.service output/init/
|
cp init/sftpgo.service output/init/
|
||||||
else
|
else
|
||||||
cp -r init/com.github.drakkan.sftpgo.plist output/init/
|
cp init/com.github.drakkan.sftpgo.plist output/init/
|
||||||
fi
|
fi
|
||||||
./sftpgo gen completion bash > output/bash_completion/sftpgo-completion.bash
|
./sftpgo gen completion bash > output/bash_completion/sftpgo-completion.bash
|
||||||
./sftpgo gen completion zsh > output/zsh_completion/_sftpgo
|
./sftpgo gen completion zsh > output/zsh_completion/_sftpgo
|
||||||
|
|
|
@ -16,24 +16,24 @@ var genCompletionCmd = &cobra.Command{
|
||||||
|
|
||||||
Bash:
|
Bash:
|
||||||
|
|
||||||
$ source <(sftpgo completion bash)
|
$ source <(sftpgo gen completion bash)
|
||||||
|
|
||||||
# To load completions for each session, execute once:
|
# To load completions for each session, execute once:
|
||||||
Linux:
|
Linux:
|
||||||
$ sftpgo completion bash > /etc/bash_completion.d/sftpgo-completion.bash
|
$ sftpgo gen completion bash > /etc/bash_completion.d/sftpgo-completion.bash
|
||||||
MacOS:
|
MacOS:
|
||||||
$ sftpgo completion bash > /usr/local/etc/bash_completion.d/sftpgo-completion.bash
|
$ sftpgo gen completion bash > /usr/local/etc/bash_completion.d/sftpgo-completion.bash
|
||||||
|
|
||||||
Zsh:
|
Zsh:
|
||||||
|
|
||||||
$ source <(sftpgo completion zsh)
|
$ source <(sftpgo gen completion zsh)
|
||||||
|
|
||||||
# To load completions for each session, execute once:
|
# To load completions for each session, execute once:
|
||||||
$ sftpgo completion zsh > "${fpath[1]}/_sftpgo"
|
$ sftpgo completion zsh > "${fpath[1]}/_sftpgo"
|
||||||
|
|
||||||
Fish:
|
Fish:
|
||||||
|
|
||||||
$ sftpgo completion fish | source
|
$ sftpgo gen completion fish | source
|
||||||
|
|
||||||
# To load completions for each session, execute once:
|
# To load completions for each session, execute once:
|
||||||
$ sftpgo completion fish > ~/.config/fish/completions/sftpgo.fish
|
$ sftpgo completion fish > ~/.config/fish/completions/sftpgo.fish
|
||||||
|
|
|
@ -7,7 +7,7 @@ ARG TAG
|
||||||
ARG FEATURES
|
ARG FEATURES
|
||||||
# Use --build-arg TAG=LATEST for latest tag. Use e.g. --build-arg TAG=0.9.6 for a specific tag/commit. Otherwise HEAD (master) is built.
|
# Use --build-arg TAG=LATEST for latest tag. Use e.g. --build-arg TAG=0.9.6 for a specific tag/commit. Otherwise HEAD (master) is built.
|
||||||
RUN git checkout $(if [ "${TAG}" = LATEST ]; then echo `git rev-list --tags --max-count=1`; elif [ -n "${TAG}" ]; then echo "${TAG}"; else echo HEAD; fi)
|
RUN git checkout $(if [ "${TAG}" = LATEST ]; then echo `git rev-list --tags --max-count=1`; elif [ -n "${TAG}" ]; then echo "${TAG}"; else echo HEAD; fi)
|
||||||
RUN go build -i $(if [ -n "${FEATURES}" ]; then echo "-tags ${FEATURES}"; fi) -ldflags "-s -w -X github.com/drakkan/sftpgo/version.commit=`git describe --always --dirty` -X github.com/drakkan/sftpgo/version.date=`date -u +%FT%TZ`" -o /go/bin/sftpgo
|
RUN go build $(if [ -n "${FEATURES}" ]; then echo "-tags ${FEATURES}"; fi) -ldflags "-s -w -X github.com/drakkan/sftpgo/version.commit=`git describe --always --dirty` -X github.com/drakkan/sftpgo/version.date=`date -u +%FT%TZ`" -o /go/bin/sftpgo
|
||||||
|
|
||||||
FROM alpine:latest
|
FROM alpine:latest
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ ARG TAG
|
||||||
ARG FEATURES
|
ARG FEATURES
|
||||||
# Use --build-arg TAG=LATEST for latest tag. Use e.g. --build-arg TAG=0.9.6 for a specific tag/commit. Otherwise HEAD (master) is built.
|
# Use --build-arg TAG=LATEST for latest tag. Use e.g. --build-arg TAG=0.9.6 for a specific tag/commit. Otherwise HEAD (master) is built.
|
||||||
RUN git checkout $(if [ "${TAG}" = LATEST ]; then echo `git rev-list --tags --max-count=1`; elif [ -n "${TAG}" ]; then echo "${TAG}"; else echo HEAD; fi)
|
RUN git checkout $(if [ "${TAG}" = LATEST ]; then echo `git rev-list --tags --max-count=1`; elif [ -n "${TAG}" ]; then echo "${TAG}"; else echo HEAD; fi)
|
||||||
RUN go build -i $(if [ -n "${FEATURES}" ]; then echo "-tags ${FEATURES}"; fi) -ldflags "-s -w -X github.com/drakkan/sftpgo/version.commit=`git describe --always --dirty` -X github.com/drakkan/sftpgo/version.date=`date -u +%FT%TZ`" -o sftpgo
|
RUN go build $(if [ -n "${FEATURES}" ]; then echo "-tags ${FEATURES}"; fi) -ldflags "-s -w -X github.com/drakkan/sftpgo/version.commit=`git describe --always --dirty` -X github.com/drakkan/sftpgo/version.date=`date -u +%FT%TZ`" -o sftpgo
|
||||||
|
|
||||||
# now define the run environment
|
# now define the run environment
|
||||||
FROM debian:latest
|
FROM debian:latest
|
||||||
|
|
|
@ -36,7 +36,7 @@ Version info, such as git commit and build date, can be embedded setting the fol
|
||||||
For example, you can build using the following command:
|
For example, you can build using the following command:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
go build -i -tags nogcs,nos3,nosqlite -ldflags "-s -w -X github.com/drakkan/sftpgo/version.commit=`git describe --always --dirty` -X github.com/drakkan/sftpgo/version.date=`date -u +%FT%TZ`" -o sftpgo
|
go build -tags nogcs,nos3,nosqlite -ldflags "-s -w -X github.com/drakkan/sftpgo/version.commit=`git describe --always --dirty` -X github.com/drakkan/sftpgo/version.date=`date -u +%FT%TZ`" -o sftpgo
|
||||||
```
|
```
|
||||||
|
|
||||||
You should get a version that includes git commit, build date and available features like this one:
|
You should get a version that includes git commit, build date and available features like this one:
|
||||||
|
|
|
@ -9,19 +9,22 @@ Here are some basic instructions to run SFTPGo as service, please run the follow
|
||||||
```bash
|
```bash
|
||||||
# create the required directories
|
# create the required directories
|
||||||
sudo mkdir -p /etc/sftpgo \
|
sudo mkdir -p /etc/sftpgo \
|
||||||
/var/lib/sftpgo
|
/var/lib/sftpgo \
|
||||||
|
/usr/share/sftpgo
|
||||||
|
|
||||||
# install sftpgo executable
|
# install sftpgo executable
|
||||||
sudo install -Dm755 sftpgo /usr/bin/sftpgo
|
sudo install -Dm755 sftpgo /usr/bin/sftpgo
|
||||||
# install the default configuration file, edit it if required
|
# install the default configuration file, edit it if required
|
||||||
sudo install -Dm644 sftpgo.json /etc/sftpgo/
|
sudo install -Dm644 sftpgo.json /etc/sftpgo/
|
||||||
# override some configuration keys using environment variables
|
# override some configuration keys using environment variables
|
||||||
sudo sh -c 'echo "SFTPGO_HTTPD__TEMPLATES_PATH=/var/lib/sftpgo/templates" > /etc/sftpgo/sftpgo.env'
|
sudo sh -c 'echo "SFTPGO_HTTPD__TEMPLATES_PATH=/usr/share/sftpgo/templates" > /etc/sftpgo/sftpgo.env'
|
||||||
sudo sh -c 'echo "SFTPGO_HTTPD__STATIC_FILES_PATH=/var/lib/sftpgo/static" >> /etc/sftpgo/sftpgo.env'
|
sudo sh -c 'echo "SFTPGO_HTTPD__STATIC_FILES_PATH=/usr/share/sftpgo/static" >> /etc/sftpgo/sftpgo.env'
|
||||||
sudo sh -c 'echo "SFTPGO_HTTPD__BACKUPS_PATH=/var/lib/sftpgo/backups" >> /etc/sftpgo/sftpgo.env'
|
sudo sh -c 'echo "SFTPGO_HTTPD__BACKUPS_PATH=/var/lib/sftpgo/backups" >> /etc/sftpgo/sftpgo.env'
|
||||||
sudo sh -c 'echo "SFTPGO_DATA_PROVIDER__CREDENTIALS_PATH=/var/lib/sftpgo/credentials" >> /etc/sftpgo/sftpgo.env'
|
sudo sh -c 'echo "SFTPGO_DATA_PROVIDER__CREDENTIALS_PATH=/var/lib/sftpgo/credentials" >> /etc/sftpgo/sftpgo.env'
|
||||||
|
# if you use a file based data provider such as sqlite or bolt consider to set the database path too, for example:
|
||||||
|
#sudo sh -c 'echo "SFTPGO_DATA_PROVIDER__NAME=/var/lib/sftpgo/sftpgo.db" >> /etc/sftpgo/sftpgo.env'
|
||||||
# install static files and templates for the web UI
|
# install static files and templates for the web UI
|
||||||
sudo cp -r static templates /var/lib/sftpgo/
|
sudo cp -r static templates /usr/share/sftpgo/
|
||||||
# initialize the configured data provider
|
# initialize the configured data provider
|
||||||
# if you want to use MySQL or PostgreSQL you need to create the configured database before running the initprovider command
|
# if you want to use MySQL or PostgreSQL you need to create the configured database before running the initprovider command
|
||||||
sudo /usr/bin/sftpgo initprovider -c /etc/sftpgo/
|
sudo /usr/bin/sftpgo initprovider -c /etc/sftpgo/
|
||||||
|
@ -35,6 +38,10 @@ sudo systemctl status sftpgo
|
||||||
sudo systemctl enable sftpgo
|
sudo systemctl enable sftpgo
|
||||||
# optional, install the REST API CLI. It requires python-requests to run
|
# optional, install the REST API CLI. It requires python-requests to run
|
||||||
sudo install -Dm755 examples/rest-api-cli/sftpgo_api_cli.py /usr/bin/sftpgo_api_cli
|
sudo install -Dm755 examples/rest-api-cli/sftpgo_api_cli.py /usr/bin/sftpgo_api_cli
|
||||||
|
# optional, create shell completion script, for example for bash
|
||||||
|
sudo /usr/bin/sftpgo gen completion bash > /etc/bash_completion.d/sftpgo-completion.bash
|
||||||
|
# optional, create man pages
|
||||||
|
sudo /usr/bin/sftpgo gen man -d /usr/share/man/man1
|
||||||
```
|
```
|
||||||
|
|
||||||
## macOS
|
## macOS
|
||||||
|
@ -47,6 +54,7 @@ Here are some basic instructions to run SFTPGo as service, please run the follow
|
||||||
# create the required directories
|
# create the required directories
|
||||||
sudo mkdir -p /usr/local/opt/sftpgo/init \
|
sudo mkdir -p /usr/local/opt/sftpgo/init \
|
||||||
/usr/local/opt/sftpgo/var/lib \
|
/usr/local/opt/sftpgo/var/lib \
|
||||||
|
/usr/local/opt/sftpgo/usr/share \
|
||||||
/usr/local/opt/sftpgo/var/log \
|
/usr/local/opt/sftpgo/var/log \
|
||||||
/usr/local/opt/sftpgo/etc \
|
/usr/local/opt/sftpgo/etc \
|
||||||
/usr/local/opt/sftpgo/bin
|
/usr/local/opt/sftpgo/bin
|
||||||
|
@ -59,7 +67,7 @@ sudo chown root:wheel /usr/local/opt/sftpgo/init/com.github.drakkan.sftpgo.plist
|
||||||
# install the default configuration file, edit it if required
|
# install the default configuration file, edit it if required
|
||||||
sudo cp sftpgo.json /usr/local/opt/sftpgo/etc/
|
sudo cp sftpgo.json /usr/local/opt/sftpgo/etc/
|
||||||
# install static files and templates for the web UI
|
# install static files and templates for the web UI
|
||||||
sudo cp -r static templates /usr/local/opt/sftpgo/var/lib/
|
sudo cp -r static templates /usr/local/opt/sftpgo/usr/share/
|
||||||
# initialize the configured data provider
|
# initialize the configured data provider
|
||||||
# if you want to use MySQL or PostgreSQL you need to create the configured database before running the initprovider command
|
# if you want to use MySQL or PostgreSQL you need to create the configured database before running the initprovider command
|
||||||
sudo /usr/local/opt/sftpgo/bin/sftpgo initprovider -c /usr/local/opt/sftpgo/etc/
|
sudo /usr/local/opt/sftpgo/bin/sftpgo initprovider -c /usr/local/opt/sftpgo/etc/
|
||||||
|
|
|
@ -7,7 +7,7 @@ You need to change the LDAP connection parameters and the user search query to m
|
||||||
You can build this example using the following command:
|
You can build this example using the following command:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
go build -i -ldflags "-s -w" -o ldapauth
|
go build -ldflags "-s -w" -o ldapauth
|
||||||
```
|
```
|
||||||
|
|
||||||
This program assumes that the 389ds schema was extended to add support for public keys using the following ldif file placed in `/etc/dirsrv/schema/98openssh-ldap.ldif`:
|
This program assumes that the 389ds schema was extended to add support for public keys using the following ldif file placed in `/etc/dirsrv/schema/98openssh-ldap.ldif`:
|
||||||
|
|
|
@ -7,5 +7,5 @@ You can configure the server using the [ldapauth.toml](./ldapauth.toml) configur
|
||||||
You can build this example using the following command:
|
You can build this example using the following command:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
go build -i -ldflags "-s -w" -o ldapauthserver
|
go build -ldflags "-s -w" -o ldapauthserver
|
||||||
```
|
```
|
||||||
|
|
|
@ -11,9 +11,9 @@
|
||||||
<key>SFTPGO_LOG_FILE_PATH</key>
|
<key>SFTPGO_LOG_FILE_PATH</key>
|
||||||
<string>/usr/local/opt/sftpgo/var/log/sftpgo.log</string>
|
<string>/usr/local/opt/sftpgo/var/log/sftpgo.log</string>
|
||||||
<key>SFTPGO_HTTPD__TEMPLATES_PATH</key>
|
<key>SFTPGO_HTTPD__TEMPLATES_PATH</key>
|
||||||
<string>/usr/local/opt/sftpgo/var/lib/templates</string>
|
<string>/usr/local/opt/sftpgo/usr/share/templates</string>
|
||||||
<key>SFTPGO_HTTPD__STATIC_FILES_PATH</key>
|
<key>SFTPGO_HTTPD__STATIC_FILES_PATH</key>
|
||||||
<string>/usr/local/opt/sftpgo/var/lib/static</string>
|
<string>/usr/local/opt/sftpgo/usr/share/static</string>
|
||||||
<key>SFTPGO_HTTPD__BACKUPS_PATH</key>
|
<key>SFTPGO_HTTPD__BACKUPS_PATH</key>
|
||||||
<string>/usr/local/opt/sftpgo/var/lib/backups</string>
|
<string>/usr/local/opt/sftpgo/var/lib/backups</string>
|
||||||
<key>SFTPGO_DATA_PROVIDER__CREDENTIALS_PATH</key>
|
<key>SFTPGO_DATA_PROVIDER__CREDENTIALS_PATH</key>
|
||||||
|
|
Loading…
Reference in a new issue