w0bm goes docker
This commit is contained in:
37
Dockerfile
Normal file
37
Dockerfile
Normal file
@@ -0,0 +1,37 @@
|
||||
# w0bm legacy
|
||||
FROM debian:bookworm
|
||||
COPY ./conf/entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
RUN apt update -y
|
||||
RUN apt install sudo curl -y
|
||||
# add w0bm user
|
||||
RUN useradd -ms /bin/bash w0bm
|
||||
# get php 7.1 from sury
|
||||
RUN curl -sSL https://packages.sury.org/php/README.txt | bash -x
|
||||
RUN apt update -y
|
||||
RUN apt install php7.1 php7.1-cli php7.1-ctype php7.1-curl php7.1-fileinfo php7.1-fpm php7.1-gd php7.1-iconv php7.1-mysql php7.1-opcache php7.1-pdo php7.1-phar php7.1-tokenizer php7.1-zip php7.1-json php7.1-mbstring php7.1-dom nginx ffmpeg imagemagick npm iputils-ping -y
|
||||
# w0bm specifc php changes
|
||||
RUN sed -i 's/^post_max_size = .*/post_max_size = 500M/' /etc/php/7.1/cli/php.ini
|
||||
RUN sed -i 's/^upload_max_size = .*/upload_max_size = 100M/' /etc/php/7.1/cli/php.ini
|
||||
# RUN sed -i 's/^user = .*/user = w0bm/' /etc/php/7.1/fpm/pool.d/www.conf
|
||||
# RUN sed -i 's/^group = .*/group = w0bm/' /etc/php/7.1/fpm/pool.d/www.conf
|
||||
# RUN sed -i 's/^listen.owner = .*/listen.owner = w0bm/' /etc/php/7.1/fpm/pool.d/www.conf
|
||||
# RUN sed -i 's/^listen.group = .*/listen.group = w0bm/' /etc/php/7.1/fpm/pool.d/www.conf
|
||||
# maybe if I want to start php-fpm as w0bm user
|
||||
# RUN sed -i 's%^[; ]*error_log *=.*%error_log = /proc/self/fd/2%' /etc/php/7.1/fpm/php-fpm.conf
|
||||
# USER w0bm
|
||||
# RUN php-fpm7.1 -F
|
||||
COPY ./conf/nginx_w0bm.conf /etc/nginx/conf.d/nginx_w0bm.conf
|
||||
WORKDIR /home/w0bm
|
||||
RUN git clone https://git.lat/w0bm/w0bm.git
|
||||
COPY ./conf/.env /home/w0bm/w0bm/
|
||||
WORKDIR /home/w0bm/w0bm
|
||||
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
|
||||
RUN php composer-setup.php --2.2
|
||||
RUN php7.1 composer.phar dump-autoload
|
||||
RUN php7.1 composer.phar install --no-scripts
|
||||
RUN mkdir /home/w0bm/w0bm/public/b
|
||||
RUN mkdir /home/w0bm/w0bm/public/thumbs
|
||||
RUN mkdir /home/w0bm/w0bm/public/thumbs/beta
|
||||
RUN chown -R www-data:www-data /home/w0bm/w0bm
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
Reference in New Issue
Block a user