mirror of
https://github.com/hoellen/dockerfiles.git
synced 2025-07-01 14:45:38 +00:00
delete all root process
This commit is contained in:
@ -3,13 +3,14 @@ MAINTAINER Wonderfall <wonderfall@schrodinger.io>
|
||||
|
||||
ARG GPG_rainloop="3B79 7ECE 694F 3B7B 70F3 11A4 ED7C 49D9 87DA 4591"
|
||||
|
||||
ENV GID=991 UID=991
|
||||
ENV UID=991 GID=991
|
||||
|
||||
RUN echo "@commuedge https://nl.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories \
|
||||
&& apk -U add \
|
||||
gnupg \
|
||||
nginx \
|
||||
supervisor \
|
||||
s6 \
|
||||
su-exec \
|
||||
tini@commuedge \
|
||||
php7-fpm@commuedge \
|
||||
php7-curl@commuedge \
|
||||
@ -41,11 +42,13 @@ RUN echo "@commuedge https://nl.alpinelinux.org/alpine/edge/community" >> /etc/a
|
||||
|
||||
COPY nginx.conf /etc/nginx/nginx.conf
|
||||
COPY php-fpm.conf /etc/php7/php-fpm.conf
|
||||
COPY supervisord.conf /usr/local/etc/supervisord.conf
|
||||
COPY s6.d /etc/s6.d
|
||||
COPY run.sh /usr/local/bin/run.sh
|
||||
|
||||
RUN chmod +x /usr/local/bin/run.sh
|
||||
RUN chmod +x /usr/local/bin/run.sh /etc/s6.d/*/*
|
||||
|
||||
VOLUME /rainloop/data
|
||||
EXPOSE 80
|
||||
CMD ["/sbin/tini","--","run.sh"]
|
||||
|
||||
EXPOSE 8888
|
||||
|
||||
CMD ["run.sh"]
|
||||
|
@ -11,7 +11,6 @@ Rainloop is a simple, modern & fast web-based client. More info on the [official
|
||||
- Contacts (DB) : sqlite, or mysql (server not built-in)
|
||||
- nginx + PHP7
|
||||
|
||||
|
||||
#### Build-time variables
|
||||
- **GPG_rainloop** : fingerprint of signing key
|
||||
|
||||
@ -22,6 +21,9 @@ Rainloop is a simple, modern & fast web-based client. More info on the [official
|
||||
#### Volumes
|
||||
- **/rainloop/data** : data files.
|
||||
|
||||
#### Ports
|
||||
- **8888***
|
||||
|
||||
#### Reverse proxy
|
||||
https://github.com/Wonderfall/dockerfiles/tree/master/reverse
|
||||
https://github.com/hardware/mailserver/wiki/Reverse-proxy-configuration
|
||||
https://github.com/hardware/mailserver/wiki/Reverse-proxy-configuration
|
||||
|
@ -1,6 +1,5 @@
|
||||
user rainloop;
|
||||
worker_processes auto;
|
||||
pid /var/run/nginx.pid;
|
||||
pid /tmp/nginx.pid;
|
||||
daemon off;
|
||||
|
||||
events {
|
||||
@ -47,9 +46,9 @@ http {
|
||||
image/svg+xml;
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
root /rainloop;
|
||||
index index.php index.html;
|
||||
listen 8888;
|
||||
root /rainloop;
|
||||
index index.php index.html;
|
||||
|
||||
location ^~ /data {
|
||||
deny all;
|
||||
@ -61,7 +60,7 @@ http {
|
||||
|
||||
location ~ \.php$ {
|
||||
fastcgi_index index.php;
|
||||
fastcgi_pass unix:/var/run/php-fpm.sock;
|
||||
fastcgi_pass unix:/tmp/php-fpm.sock;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
include /etc/nginx/fastcgi_params;
|
||||
}
|
||||
|
@ -2,11 +2,7 @@
|
||||
daemonize = no
|
||||
|
||||
[www]
|
||||
user = rainloop
|
||||
group = rainloop
|
||||
listen = /var/run/php-fpm.sock
|
||||
listen.owner = rainloop
|
||||
listen.group = rainloop
|
||||
listen = /tmp/php-fpm.sock
|
||||
pm = dynamic
|
||||
pm.max_children = 5
|
||||
pm.start_servers = 2
|
||||
|
@ -1,4 +1,3 @@
|
||||
#!/bin/sh
|
||||
addgroup -g ${GID} rainloop && adduser -h /rainloop -s /bin/sh -D -G rainloop -u ${UID} rainloop
|
||||
chown -R rainloop:rainloop /rainloop /var/run/php-fpm.sock /var/lib/nginx /tmp
|
||||
exec supervisord -c /usr/local/etc/supervisord.conf
|
||||
chown -R $UID:$GID /rainloop /etc/nginx /etc/php7 /var/log /var/lib/nginx /tmp /etc/s6.d
|
||||
exec su-exec $UID:$GID /sbin/tini -- /bin/s6-svscan /etc/s6.d
|
||||
|
2
rainloop/s6.d/nginx/run
Normal file
2
rainloop/s6.d/nginx/run
Normal file
@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
exec nginx
|
2
rainloop/s6.d/php/run
Normal file
2
rainloop/s6.d/php/run
Normal file
@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
exec php-fpm7
|
@ -1,8 +0,0 @@
|
||||
[supervisord]
|
||||
nodaemon=true
|
||||
|
||||
[program:php-fpm]
|
||||
command=php-fpm7
|
||||
|
||||
[program:nginx]
|
||||
command=nginx
|
Reference in New Issue
Block a user