changing to /opt and adding Readme
This commit is contained in:
27
Dockerfile
27
Dockerfile
@@ -4,34 +4,21 @@ COPY ./conf/entrypoint.sh /entrypoint.sh
|
|||||||
RUN chmod +x /entrypoint.sh
|
RUN chmod +x /entrypoint.sh
|
||||||
RUN apt update -y
|
RUN apt update -y
|
||||||
RUN apt install sudo curl -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 curl -sSL https://packages.sury.org/php/README.txt | bash -x
|
||||||
RUN apt update -y
|
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
|
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 git -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/^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/^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
|
COPY ./conf/nginx_w0bm.conf /etc/nginx/conf.d/nginx_w0bm.conf
|
||||||
WORKDIR /home/w0bm
|
WORKDIR /opt
|
||||||
RUN git clone https://git.lat/w0bm/w0bm.git
|
RUN git clone https://git.lat/w0bm/w0bm.git
|
||||||
COPY ./conf/.env /home/w0bm/w0bm/
|
COPY ./conf/.env /opt/w0bm/
|
||||||
WORKDIR /home/w0bm/w0bm
|
WORKDIR /opt/w0bm
|
||||||
|
RUN chown -R www-data:www-data /opt/w0bm
|
||||||
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
|
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
|
||||||
RUN php composer-setup.php --2.2
|
RUN php composer-setup.php --2.2
|
||||||
|
USER www-data
|
||||||
RUN php7.1 composer.phar dump-autoload
|
RUN php7.1 composer.phar dump-autoload
|
||||||
RUN php7.1 composer.phar install --no-scripts
|
RUN php7.1 composer.phar install --no-scripts
|
||||||
RUN mkdir /home/w0bm/w0bm/public/b
|
USER root
|
||||||
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"]
|
ENTRYPOINT ["/entrypoint.sh"]
|
21
README.md
Normal file
21
README.md
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
# dw0
|
||||||
|
|
||||||
|
w0bm in docker
|
||||||
|
|
||||||
|
This repository contains a working solution for easy deployment of the legacy [w0bm](https://git.lat/w0bm/w0bm) software
|
||||||
|
|
||||||
|
To make use of this you can just pull this repo and build the image and or run the compose
|
||||||
|
|
||||||
|
You still need to initialize the software and the database manually if you do not have a already existing initialized database.
|
||||||
|
|
||||||
|
First of all put a .webm file named 1.webm in `w0bm-data/b`
|
||||||
|
|
||||||
|
`docker exec -it w0bm-legacy /bin/bash`
|
||||||
|
|
||||||
|
`php7.1 artisan migrate`
|
||||||
|
|
||||||
|
`php7.1 artisan db:seed`
|
||||||
|
|
||||||
|
`php7.1 artisan tags`
|
||||||
|
|
||||||
|
Now visit http://localhost:8080
|
@@ -18,5 +18,5 @@ RECAPTCHA_PRIVATE=
|
|||||||
MATRIX_MAUAUTH=
|
MATRIX_MAUAUTH=
|
||||||
MATRIX_MAUURL=
|
MATRIX_MAUURL=
|
||||||
|
|
||||||
# if you are developing
|
# if you are developing else set to true
|
||||||
SECURE_COOKIE=false
|
SECURE_COOKIE=false
|
@@ -3,7 +3,7 @@ server {
|
|||||||
server_name _;
|
server_name _;
|
||||||
access_log /var/log/nginx/w0bm_access.log;
|
access_log /var/log/nginx/w0bm_access.log;
|
||||||
error_log /var/log/nginx/w0bm_error.log;
|
error_log /var/log/nginx/w0bm_error.log;
|
||||||
root /home/w0bm/w0bm/public;
|
root /opt/w0bm/public;
|
||||||
index index.php;
|
index index.php;
|
||||||
client_max_body_size 500M;
|
client_max_body_size 500M;
|
||||||
gzip on;
|
gzip on;
|
||||||
|
@@ -1,16 +1,19 @@
|
|||||||
#w0bm legacy deployment
|
#w0bm legacy deployment
|
||||||
services:
|
services:
|
||||||
w0bm:
|
w0bm-legacy:
|
||||||
container_name: w0bm-legacy
|
container_name: w0bm-legacy
|
||||||
image: w0bm-legacy:latest #dev
|
image: w0bm-legacy:opt-1 #dev
|
||||||
build:
|
build:
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
depends_on:
|
depends_on:
|
||||||
- mariadb
|
- mariadb
|
||||||
networks:
|
networks:
|
||||||
- w0bm
|
- w0bm
|
||||||
# volumes:
|
volumes:
|
||||||
# - foo:bar
|
- ./w0bm-data/b:/opt/w0bm/public/b
|
||||||
|
- ./w0bm-data/thumbs:/opt/w0bm/public/thumbs
|
||||||
|
- ./w0bm-data/thumbs/beta:/opt/w0bm/public/thumbs/beta
|
||||||
|
- ./w0bm-data/images:/opt/w0bm/public/image
|
||||||
ports:
|
ports:
|
||||||
- "8080:8080"
|
- "8080:8080"
|
||||||
restart: on-failure
|
restart: on-failure
|
||||||
@@ -26,9 +29,12 @@ services:
|
|||||||
- "3307:3306"
|
- "3307:3306"
|
||||||
networks:
|
networks:
|
||||||
- w0bm
|
- w0bm
|
||||||
|
volumes:
|
||||||
|
- ./w0bm-db:/var/lib/mysql
|
||||||
networks:
|
networks:
|
||||||
w0bm:
|
w0bm:
|
||||||
driver: bridge
|
driver: bridge
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
w0bm:
|
w0bm:
|
||||||
|
w0bm-db:
|
Reference in New Issue
Block a user