ensuring that container can run read-only and logs are forwarded to docker logs, fixes for latest alpine and cleanup

This commit is contained in:
El RIDO
2018-06-05 06:55:45 +02:00
parent d8a9f45cb2
commit cf7d8e1e48
7 changed files with 49 additions and 31 deletions

6
entrypoint.sh Normal file → Executable file
View File

@@ -1,11 +1,11 @@
#!/bin/sh
addgroup -g ${GID} privatebin && adduser -h /privatebin -s /bin/sh -D -G privatebin -u ${UID} privatebin
touch /var/run/php-fpm.sock
addgroup -g ${GID} privatebin && \
adduser -h /privatebin -H -s /bin/sh -D -G privatebin -u ${UID} privatebin
if [ ! -f /privatebin/cfg/conf.php ]; then
cp /privatebin/conf.sample.php /privatebin/cfg/conf.php
fi
chown -R privatebin:privatebin /privatebin /var/run/php-fpm.sock /var/lib/nginx /tmp /var/tmp/nginx
chown -R privatebin:privatebin /privatebin/data
supervisord -c /usr/local/etc/supervisord.conf