Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
24aea9ae06 | |||
27b1aa1db4 | |||
![]() |
c4162eb700 | ||
![]() |
35731c0135 | ||
![]() |
54ad7cbcf9 |
12
.drone.yml
12
.drone.yml
@ -1,13 +1,15 @@
|
|||||||
pipeline:
|
kind: pipeline
|
||||||
nginx-conf:
|
name: default
|
||||||
|
steps:
|
||||||
|
- name: nginx-conf
|
||||||
image: nginx:mainline
|
image: nginx:mainline
|
||||||
commands:
|
commands:
|
||||||
- cp -r nginx /etc/nginx
|
- cp -r nginx /etc/nginx
|
||||||
- nginx -t
|
- nginx -t
|
||||||
docker:
|
- name: docker
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
repo: repo.shimun.net/shimun/seafile
|
repo: repo.shimun.net/shimun/seafile
|
||||||
tag: riffol
|
auto_tag: true
|
||||||
registry: repo.shimun.net
|
registry: repo.shimun.net
|
||||||
storage_path: /drone/.docker
|
storage_path: /drone/.docker
|
||||||
secrets: ["docker_username", "docker_password"]
|
secrets: ["docker_username", "docker_password"]
|
||||||
@ -15,3 +17,5 @@ pipeline:
|
|||||||
cache_from: ["repo.shimun.net/shimun/seafile", "repo.shimun.net/shimun/seafile:nginx-deb", "repo.shimun.net/shimun/seafile:alpine"]
|
cache_from: ["repo.shimun.net/shimun/seafile", "repo.shimun.net/shimun/seafile:nginx-deb", "repo.shimun.net/shimun/seafile:alpine"]
|
||||||
use_cache: true
|
use_cache: true
|
||||||
pull_image: false
|
pull_image: false
|
||||||
|
when:
|
||||||
|
event: tag
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
FROM rust:1.34 AS riffol_build
|
FROM rust:1.34 AS riffol_build
|
||||||
|
|
||||||
RUN cargo install --git https://github.com/shimunn/riffol.git --branch print_error
|
RUN cargo install --git https://github.com/shimunn/riffol.git --branch 32b
|
||||||
|
|
||||||
FROM nginx:mainline
|
FROM nginx:mainline
|
||||||
|
|
||||||
@ -12,7 +12,7 @@ ENV SEAF=/opt/seafile
|
|||||||
|
|
||||||
COPY requirements.txt /tmp/requirements.txt
|
COPY requirements.txt /tmp/requirements.txt
|
||||||
|
|
||||||
RUN apt update && apt install locales -y && apt install -y --no-install-recommends procps openssl python2.7 sqlite3 python-mysqldb python-pil curl libjansson4 libfuse2 python-pip python-pip-whl python-setuptools \
|
RUN apt update && apt install locales -y && apt install -y --no-install-recommends procps openssl python3 sqlite3 python-mysqldb python-pil curl libjansson4 libfuse2 python-pip python-pip-whl python-setuptools \
|
||||||
&& pip install -r /tmp/requirements.txt && apt remove -y python-pip \
|
&& pip install -r /tmp/requirements.txt && apt remove -y python-pip \
|
||||||
&& rm -rf /var/lib/apt/lists/* /tmp/requirements.txt
|
&& rm -rf /var/lib/apt/lists/* /tmp/requirements.txt
|
||||||
|
|
||||||
|
@ -3,4 +3,6 @@ scriptine
|
|||||||
setuptools
|
setuptools
|
||||||
simplejson
|
simplejson
|
||||||
python-memcached
|
python-memcached
|
||||||
urllib3
|
pyyaml
|
||||||
|
requests==2.18.4
|
||||||
|
requests_oauthlib==0.8.0
|
||||||
|
@ -8,10 +8,7 @@ version_re = "seafile-server-?_?([\d\.]*)"
|
|||||||
seaf_home = os.environ["SEAF"] or "/opt/seafile"
|
seaf_home = os.environ["SEAF"] or "/opt/seafile"
|
||||||
|
|
||||||
def available(page):
|
def available(page):
|
||||||
(arch, _) = platform.architecture()
|
arch = platform.machine()
|
||||||
if arch == "64bit":
|
|
||||||
arch = "x86-64"
|
|
||||||
else: arch = "i386"
|
|
||||||
link = "http(s?):\/\/[^ \"\(\)\<\>]*%s_?%s.tar.gz" % (version_re ,arch)
|
link = "http(s?):\/\/[^ \"\(\)\<\>]*%s_?%s.tar.gz" % (version_re ,arch)
|
||||||
resp = requests.get(page)
|
resp = requests.get(page)
|
||||||
available = {}
|
available = {}
|
||||||
@ -99,6 +96,8 @@ def download(url, version):
|
|||||||
return 0
|
return 0
|
||||||
|
|
||||||
def install_command(url, version):
|
def install_command(url, version):
|
||||||
|
if platform.machine() == "armv7l":
|
||||||
|
url = "https://github.com/haiwen/seafile-rpi/releases/download/v%s/seafile-server_%s_stable_pi.tar.gz" % (version,version)
|
||||||
pkg = download(url, version)
|
pkg = download(url, version)
|
||||||
tmp = tempfile.mkdtemp()
|
tmp = tempfile.mkdtemp()
|
||||||
if pkg and call(["/bin/sh", "-c", 'cd %s; tar xzvf %s' % (tmp, pkg)]) == 0:
|
if pkg and call(["/bin/sh", "-c", 'cd %s; tar xzvf %s' % (tmp, pkg)]) == 0:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user