Compare commits
33 Commits
feature/su
...
master
Author | SHA1 | Date |
---|---|---|
Andy | 7d8eb8cea1 | 5 years ago |
Andy | 5b0af8a081 | 5 years ago |
Andy | 1c58dda774 | 5 years ago |
Andy | ecbd9281dc | 5 years ago |
Tobias Reich | a0c2254511 | 6 years ago |
Andy | c4a27ae7f1 | 6 years ago |
Andy | c23dbc327e | 6 years ago |
Fly Man | 2a8b1f9ec2 | 6 years ago |
Tobias Reich | b2997c37da | 6 years ago |
Fly Man | 9efb4ab038 | 6 years ago |
Fly Man | 4680f59483 | 6 years ago |
Fly Man | 8f44348542 | 6 years ago |
Robbert | 9cbac99e5f | 6 years ago |
Robbert | 6de5846ce2 | 6 years ago |
Fly Man | a9676b0169 | 6 years ago |
Fly Man | 20a1ff2d61 | 6 years ago |
Fly Man | ab0f86f5fb | 6 years ago |
Fly Man | 3c07cadb17 | 6 years ago |
Fly Man | 878ecd0e32 | 6 years ago |
Fly Man | f53ad85ca1 | 6 years ago |
Tobias Reich | 8b2c07861d | 7 years ago |
Tobias Reich | 95e3f25522 | 7 years ago |
Tobias Reich | 27f207dcba | 7 years ago |
James Webster | fe1a9edd38 | 7 years ago |
Tobias Reich | 63cba554cb | 7 years ago |
Tobias Reich | 34d2c740fd | 7 years ago |
Tobias Reich | dfd18977e7 | 7 years ago |
Tobias Reich | bd71bd4352 | 7 years ago |
Tobias Reich | 676e4109ef | 7 years ago |
Tobias Reich | 767d97780b | 8 years ago |
Tobias Reich | d050935981 | 8 years ago |
Tobias Reich | 3eaaed7271 | 8 years ago |
Tobias Reich | c0de7b8c63 | 8 years ago |
@ -0,0 +1,47 @@
|
||||
---
|
||||
kind: pipeline
|
||||
name: default
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: amd64
|
||||
|
||||
steps:
|
||||
- name: publish
|
||||
pull: default
|
||||
image: plugins/docker:18.09
|
||||
settings:
|
||||
registry: https://registry.nixaid.com
|
||||
repo: "registry.nixaid.com/${DRONE_REPO_NAMESPACE}/${DRONE_REPO_NAME}"
|
||||
tags:
|
||||
- latest
|
||||
username:
|
||||
from_secret: docker_username
|
||||
password:
|
||||
from_secret: docker_password
|
||||
# storage_path: /drone/docker
|
||||
# storage_driver: aufs
|
||||
# ipv6: false
|
||||
# debug: true
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
event:
|
||||
- push
|
||||
- tag
|
||||
|
||||
- name: notify
|
||||
pull: default
|
||||
image: drillster/drone-email:latest
|
||||
settings:
|
||||
from: "Drone CI <noreply@nixaid.com>"
|
||||
host: mx.nixaid.com
|
||||
port: 587
|
||||
subject: "NIXAID Drone Pipeline {{#success build.status}}SUCCESS{{else}}FAILURE{{/success}} Notification"
|
||||
when:
|
||||
event:
|
||||
- push
|
||||
- tag
|
||||
status:
|
||||
- success
|
||||
- failure
|
@ -0,0 +1,46 @@
|
||||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to creating a positive environment include:
|
||||
|
||||
* Using welcoming and inclusive language
|
||||
* Being respectful of differing viewpoints and experiences
|
||||
* Gracefully accepting constructive criticism
|
||||
* Focusing on what is best for the community
|
||||
* Showing empathy towards other community members
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
* The use of sexualized language or imagery and unwelcome sexual attention or advances
|
||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or electronic address, without explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
||||
|
||||
## Our Responsibilities
|
||||
|
||||
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at lychee@electerious.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
|
||||
|
||||
[homepage]: http://contributor-covenant.org
|
||||
[version]: http://contributor-covenant.org/version/1/4/
|
@ -0,0 +1,58 @@
|
||||
FROM alpine
|
||||
|
||||
ARG LYCHEE_VERSION=3.1.6
|
||||
|
||||
ENV UID=991 GID=991
|
||||
|
||||
RUN BUILD_DEPS=" \
|
||||
imagemagick-dev \
|
||||
tar \
|
||||
libressl \
|
||||
ca-certificates \
|
||||
build-base \
|
||||
autoconf \
|
||||
pcre-dev \
|
||||
libtool" \
|
||||
&& apk -U upgrade && apk add \
|
||||
${BUILD_DEPS} \
|
||||
nginx \
|
||||
php7-mbstring \
|
||||
php7-fpm \
|
||||
php7-exif \
|
||||
php7-gd \
|
||||
php7-json \
|
||||
php7-mysqli \
|
||||
php7-zip \
|
||||
php7-session \
|
||||
php7-pear \
|
||||
php7-dev \
|
||||
s6 \
|
||||
su-exec \
|
||||
imagemagick \
|
||||
&& pecl install imagick \
|
||||
&& echo "extension=imagick.so" > /etc/php7/conf.d/imagick.ini \
|
||||
&& sed -i -e "s/max_execution_time = 30/max_execution_time = 200/g" \
|
||||
-e "s/post_max_size = 8M/post_max_size = 100M/g" \
|
||||
-e "s/upload_max_filesize = 2M/upload_max_filesize = 20M/g" \
|
||||
-e "s/memory_limit = 256M/memory_limit = 512M/g" \
|
||||
/etc/php7/php.ini \
|
||||
&& mkdir /lychee \
|
||||
&& apk del ${BUILD_DEPS} php7-pear php7-dev \
|
||||
&& rm -rf /var/cache/apk/* /tmp/*
|
||||
|
||||
COPY . /lychee/
|
||||
|
||||
RUN mv /lychee/docker/nginx.conf /etc/nginx/nginx.conf && \
|
||||
mv /lychee/docker/php-fpm.conf /etc/php7/php-fpm.conf && \
|
||||
mv /lychee/docker/s6.d /etc/ && \
|
||||
mv /lychee/docker/run.sh /usr/local/bin/run.sh
|
||||
|
||||
RUN chmod +x /usr/local/bin/run.sh /etc/s6.d/*/* /etc/s6.d/.s6-svscan/*
|
||||
|
||||
VOLUME /lychee/uploads /lychee/data
|
||||
|
||||
EXPOSE 8888
|
||||
|
||||
LABEL maintainer="Andrey Arapov <andrey.arapov@nixaid.com>"
|
||||
|
||||
CMD ["run.sh"]
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,26 @@
|
||||
## wonderfall/lychee
|
||||
|
||||
![](http://lychee.electerious.com/assets/images/showcase.jpg)
|
||||
|
||||
#### What is this?
|
||||
Lychee is a free photo-management tool, which runs on your server or web-space. Installing is a matter of seconds. Upload, manage and share photos like from a native application. Lychee comes with everything you need and all your photos are stored securely.
|
||||
|
||||
#### Features
|
||||
- Based on Alpine Linux.
|
||||
- nginx + PHP7.
|
||||
- Active Imagemagick + pecl ext.
|
||||
|
||||
#### Build-time variables
|
||||
- **LYCHEE_VERSION** : version of Lychee.
|
||||
- **IMAGICK_EXT_VERSION** : version of imagick pecl extension.
|
||||
|
||||
#### Environment variables
|
||||
- **UID** : lychee user id *(default : 991)*.
|
||||
- **GID** : lychee group id *(default : 991)*.
|
||||
|
||||
#### Volumes
|
||||
- **/lychee/uploads** : uploads.
|
||||
- **/lychee/data** : data files.
|
||||
|
||||
#### Ports
|
||||
- **8888** [(reverse proxy!)](https://github.com/hardware/mailserver/wiki/Reverse-proxy-configuration)
|
@ -0,0 +1,88 @@
|
||||
worker_processes auto;
|
||||
pid /tmp/nginx.pid;
|
||||
daemon off;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
use epoll;
|
||||
}
|
||||
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
access_log off;
|
||||
error_log /tmp/ngx_error.log error;
|
||||
|
||||
sendfile on;
|
||||
keepalive_timeout 15;
|
||||
keepalive_disable msie6;
|
||||
keepalive_requests 100;
|
||||
tcp_nopush on;
|
||||
tcp_nodelay on;
|
||||
server_tokens off;
|
||||
|
||||
fastcgi_temp_path /tmp/fastcgi 1 2;
|
||||
client_body_temp_path /tmp/client_body 1 2;
|
||||
proxy_temp_path /tmp/proxy 1 2;
|
||||
uwsgi_temp_path /tmp/uwsgi 1 2;
|
||||
scgi_temp_path /tmp/scgi 1 2;
|
||||
|
||||
gzip on;
|
||||
gzip_comp_level 5;
|
||||
gzip_min_length 512;
|
||||
gzip_buffers 4 8k;
|
||||
gzip_proxied any;
|
||||
gzip_vary on;
|
||||
gzip_disable "msie6";
|
||||
gzip_types
|
||||
text/css
|
||||
text/javascript
|
||||
text/xml
|
||||
text/plain
|
||||
text/x-component
|
||||
application/javascript
|
||||
application/x-javascript
|
||||
application/json
|
||||
application/xml
|
||||
application/rss+xml
|
||||
application/vnd.ms-fontobject
|
||||
font/truetype
|
||||
font/opentype
|
||||
image/svg+xml;
|
||||
|
||||
server {
|
||||
listen 8888;
|
||||
root /lychee;
|
||||
index index.php index.html;
|
||||
client_max_body_size 100M;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
location ~* \.(?:ico|css|js|gif|jpe?g|png|ttf|woff)\$ {
|
||||
access_log off;
|
||||
expires 30d;
|
||||
add_header Pragma public;
|
||||
add_header Cache-Control "public, mustrevalidate, proxy-revalidate";
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
fastcgi_split_path_info ^(.*\.php)(/.*)?$;
|
||||
fastcgi_pass unix:/tmp/php-fpm.sock;
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_intercept_errors off;
|
||||
fastcgi_buffer_size 16k;
|
||||
fastcgi_buffers 4 16k;
|
||||
}
|
||||
|
||||
location ~ /\.ht {
|
||||
deny all;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
[global]
|
||||
daemonize = no
|
||||
|
||||
[www]
|
||||
listen = /tmp/php-fpm.sock
|
||||
pm = dynamic
|
||||
pm.max_children = 5
|
||||
pm.start_servers = 2
|
||||
pm.min_spare_servers = 1
|
||||
pm.max_spare_servers = 3
|
||||
chdir = /
|
@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
mkdir /lychee/uploads/big /lychee/uploads/import /lychee/uploads/medium /lychee/uploads/thumb
|
||||
chown -R $UID:$GID /lychee /etc/nginx /etc/php7 /var/log /var/lib/nginx /tmp /etc/s6.d
|
||||
exec su-exec $UID:$GID /bin/s6-svscan /etc/s6.d
|
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
exit 0
|
@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
exec nginx
|
@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
exec php-fpm7
|
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Update to version 3.1.7
|
||||
*/
|
||||
|
||||
use Lychee\Modules\Database;
|
||||
use Lychee\Modules\Response;
|
||||
|
||||
// Add position to photos
|
||||
$query = Database::prepare($connection, "SELECT `position` FROM `?` LIMIT 1", array(LYCHEE_TABLE_PHOTOS));
|
||||
$result = Database::execute($connection, $query, 'update_030107', __LINE__);
|
||||
|
||||
if ($result===false) {
|
||||
|
||||
$query = Database::prepare($connection, "ALTER TABLE `?` ADD `position` TINYINT(1) NOT NULL", array(LYCHEE_TABLE_PHOTOS));
|
||||
$result = Database::execute($connection, $query, 'update_030107', __LINE__);
|
||||
|
||||
if ($result===false) Response::error('Could not add position to database!');
|
||||
|
||||
}
|
||||
// Set version
|
||||
if (Database::setVersion($connection, '030107')===false) Response::error('Could not update version of database!');
|
||||
|
||||
?>
|
Loading…
Reference in new issue