Compare commits

...

6 Commits

Author SHA1 Message Date
Nicola Murino
cd4a68cc96 set version to 2.0.1 2021-02-06 15:28:30 +01:00
Nicola Murino
b37eb68993 docker alpine: revert to 3.12 since we have to release 2.0.1 2021-02-06 14:58:19 +01:00
Nicola Murino
b13958a8d6 docker: fix httpd address 2021-02-06 14:51:55 +01:00
Nicola Murino
17e2b234a0 dataprovider: fix migration with old mysql versions
Fixes #298
2021-02-06 14:33:51 +01:00
Nicola Murino
4ef1775e9a docker: switch to Alpine 3.13 2021-02-06 12:54:13 +01:00
Nicola Murino
363977b474 back to development 2021-02-06 12:23:26 +01:00
14 changed files with 35 additions and 38 deletions

View File

@@ -1,4 +1,4 @@
FROM golang:1.15 as builder
FROM golang:1.15-buster as builder
ENV GOFLAGS="-mod=readonly"
@@ -48,7 +48,7 @@ ENV SFTPGO_HTTPD__STATIC_FILES_PATH=/usr/share/sftpgo/static
# Modify the default configuration file
RUN sed -i "s|\"users_base_dir\": \"\",|\"users_base_dir\": \"/srv/sftpgo/data\",|" /etc/sftpgo/sftpgo.json && \
sed -i "s|\"backups\"|\"/srv/sftpgo/backups\"|" /etc/sftpgo/sftpgo.json && \
sed -i "s|\"bind_address\": \"127.0.0.1\",|\"bind_address\": \"\",|" /etc/sftpgo/sftpgo.json
sed -i "s|\"address\": \"127.0.0.1\",|\"address\": \"\",|" /etc/sftpgo/sftpgo.json
COPY ./docker/scripts/entrypoint.sh /docker-entrypoint.sh

View File

@@ -1,4 +1,4 @@
FROM golang:1.15-alpine AS builder
FROM golang:1.15-alpine3.12 AS builder
ENV GOFLAGS="-mod=readonly"
@@ -53,7 +53,7 @@ ENV SFTPGO_HTTPD__STATIC_FILES_PATH=/usr/share/sftpgo/static
# Modify the default configuration file
RUN sed -i "s|\"users_base_dir\": \"\",|\"users_base_dir\": \"/srv/sftpgo/data\",|" /etc/sftpgo/sftpgo.json && \
sed -i "s|\"backups\"|\"/srv/sftpgo/backups\"|" /etc/sftpgo/sftpgo.json && \
sed -i "s|\"bind_address\": \"127.0.0.1\",|\"bind_address\": \"\",|" /etc/sftpgo/sftpgo.json
sed -i "s|\"address\": \"127.0.0.1\",|\"address\": \"\",|" /etc/sftpgo/sftpgo.json
RUN chown -R sftpgo:sftpgo /etc/sftpgo && chown sftpgo:sftpgo /var/lib/sftpgo /srv/sftpgo

View File

@@ -47,9 +47,9 @@ const (
mysqlV8SQL = "ALTER TABLE `{{folders}}` ADD COLUMN `name` varchar(255) NULL;" +
"ALTER TABLE `{{folders}}` MODIFY `path` varchar(512) NULL;" +
"ALTER TABLE `{{folders}}` DROP INDEX `path`;" +
"UPDATE `{{folders}}` f1 SET name = (SELECT CONCAT('folder',f2.id) FROM `{{folders}}` f2 WHERE f2.id = f1.id);" +
"UPDATE `{{folders}}` f1 SET name = CONCAT('folder',f1.id);" +
"ALTER TABLE `{{folders}}` MODIFY `name` varchar(255) NOT NULL;" +
"ALTER TABLE `folders` ADD CONSTRAINT `name` UNIQUE (`name`);"
"ALTER TABLE `{{folders}}` ADD CONSTRAINT `name` UNIQUE (`name`);"
mysqlV8DownSQL = "ALTER TABLE `{{folders}}` DROP COLUMN `name`;" +
"ALTER TABLE `{{folders}}` MODIFY `path` varchar(512) NOT NULL;" +
"ALTER TABLE `{{folders}}` ADD CONSTRAINT `path` UNIQUE (`path`);"

View File

@@ -4,10 +4,10 @@ SFTPGo provides an official Docker image, it is available on both [Docker Hub](h
## Supported tags and respective Dockerfile links
- [v2.0.0, v2.0, v2, latest](https://github.com/drakkan/sftpgo/blob/v2.0.0/Dockerfile.full)
- [v2.0.0-alpine, v2.0-alpine, v2-alpine, alpine](https://github.com/drakkan/sftpgo/blob/v2.0.0/Dockerfile.full.alpine)
- [v2.0.0-slim, v2.0-slim, v2-slim, slim](https://github.com/drakkan/sftpgo/blob/v2.0.0/Dockerfile)
- [v2.0.0-alpine-slim, v2.0-alpine-slim, v2-alpine-slim, alpine-slim](https://github.com/drakkan/sftpgo/blob/v2.0.0/Dockerfile.alpine)
- [v2.0.1, v2.0, v2, latest](https://github.com/drakkan/sftpgo/blob/v2.0.1/Dockerfile.full)
- [v2.0.1-alpine, v2.0-alpine, v2-alpine, alpine](https://github.com/drakkan/sftpgo/blob/v2.0.1/Dockerfile.full.alpine)
- [v2.0.1-slim, v2.0-slim, v2-slim, slim](https://github.com/drakkan/sftpgo/blob/v2.0.1/Dockerfile)
- [v2.0.1-alpine-slim, v2.0-alpine-slim, v2-alpine-slim, alpine-slim](https://github.com/drakkan/sftpgo/blob/v2.0.1/Dockerfile.alpine)
- [edge](../Dockerfile.full)
- [edge-alpine](../Dockerfile.full.alpine)
- [edge-slim](../Dockerfile)

View File

@@ -41,7 +41,7 @@ description: |
Fully featured and highly configurable SFTP server
SFTPGo has optional FTP/S and WebDAV support.
It can serve local filesystem, S3 (Compatible) Object Storage,
Google Cloud Storage and Azure Blob Storage.
Google Cloud Storage, Azure Blob Storage, SFTP.
vendor: "SFTPGo"
homepage: "https://github.com/drakkan/sftpgo"
license: "GPL-3.0"

View File

@@ -1,3 +1,15 @@
sftpgo (2.0.1-1ppa1) bionic; urgency=medium
* New upstream release.
-- Nicola Murino <nicola.murino@gmail.com> Sat, 06 Feb 2021 15:25:19 +0100
sftpgo (2.0.0-1ppa1) bionic; urgency=medium
* New upstream release.
-- Nicola Murino <nicola.murino@gmail.com> Sat, 06 Feb 2021 11:05:48 +0100
sftpgo (1.2.2-1ppa1) bionic; urgency=medium
* New upstream release.

View File

@@ -11,8 +11,7 @@ Package: sftpgo
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Recommends: bash-completion, mime-support
Suggests: python3-requests, python3-pygments
Description: Fully featured and highly configurable SFTP server
SFTPGo has optional FTP/S and WebDAV support.
It can serve local filesystem, S3 (Compatible) Object Storage,
Google Cloud Storage and Azure Blob Storage.
Google Cloud Storage, Azure Blob Storage, SFTP.

View File

@@ -2,17 +2,17 @@ Index: sftpgo/sftpgo.json
===================================================================
--- sftpgo.orig/sftpgo.json
+++ sftpgo/sftpgo.json
@@ -74,7 +74,7 @@
@@ -113,7 +113,7 @@
},
"data_provider": {
"driver": "sqlite",
- "name": "sftpgo.db",
+ "name": "/var/lib/sftpgo/sftpgo.db",
"host": "",
"port": 5432,
"port": 0,
"username": "",
@@ -85,14 +85,14 @@
"manage_users": 1,
@@ -123,14 +123,14 @@
"sql_tables_prefix": "",
"track_quota": 2,
"pool_size": 0,
- "users_base_dir": "",
@@ -28,16 +28,16 @@ Index: sftpgo/sftpgo.json
"prefer_database_credentials": false,
"pre_login_hook": "",
"post_login_hook": "",
@@ -111,9 +111,9 @@
"httpd": {
"bind_port": 8080,
"bind_address": "127.0.0.1",
@@ -156,9 +156,9 @@
"client_auth_type": 0
}
],
- "templates_path": "templates",
- "static_files_path": "static",
- "backups_path": "backups",
+ "templates_path": "/usr/share/sftpgo/templates",
+ "static_files_path": "/usr/share/sftpgo/static",
+ "backups_path": "/srv/sftpgo/backups",
"auth_user_file": "",
"certificate_file": "",
"certificate_key_file": ""
"certificate_key_file": "",
"ca_certificates": [],

View File

@@ -1,10 +0,0 @@
Index: sftpgo/examples/rest-api-cli/sftpgo_api_cli
===================================================================
--- sftpgo.orig/examples/rest-api-cli/sftpgo_api_cli
+++ sftpgo/examples/rest-api-cli/sftpgo_api_cli
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
import argparse
import base64
from datetime import datetime

View File

@@ -1,2 +1 @@
config.diff
python3.diff

View File

@@ -26,7 +26,6 @@ if [ "$1" = "configure" ]; then
chown -R sftpgo:sftpgo /etc/sftpgo /var/lib/sftpgo /srv/sftpgo
chmod 750 /etc/sftpgo /var/lib/sftpgo /srv/sftpgo
chmod 640 /etc/sftpgo/sftpgo.json
echo "Please be sure to have the python3-requests package installed if you want to use the REST API CLI"
fi
# we added /srv/sftpgo after 1.1.0, we should check if we are upgrading

View File

@@ -26,7 +26,6 @@ if [ "$1" = "configure" ]; then
chown -R sftpgo:sftpgo /etc/sftpgo /var/lib/sftpgo /srv/sftpgo
chmod 750 /etc/sftpgo /var/lib/sftpgo /srv/sftpgo
chmod 640 /etc/sftpgo/sftpgo.json
echo "Please be sure to have the python3-requests package installed if you want to use the REST API CLI"
fi
# we added /srv/sftpgo after 1.1.0, we should check if we are upgrading

View File

@@ -19,7 +19,6 @@ if [ $1 -eq 1 ]; then
/usr/bin/chown -R sftpgo:sftpgo /etc/sftpgo /var/lib/sftpgo /srv/sftpgo
/usr/bin/chmod 750 /etc/sftpgo /var/lib/sftpgo /srv/sftpgo
/usr/bin/chmod 640 /etc/sftpgo/sftpgo.json
/bin/echo "Please be sure to have the python requests library installed if you want to use the REST API CLI"
fi
# adjust permissions for /srv/sftpgo and /var/lib/sftpgo

View File

@@ -2,7 +2,7 @@ package version
import "strings"
const version = "2.0.0"
const version = "2.0.1"
var (
commit = ""