Skip to content

Commit

Permalink
Add Browserless services
Browse files Browse the repository at this point in the history
  • Loading branch information
mmuniraju4444 committed Apr 30, 2020
1 parent 68a3c6d commit d381df5
Show file tree
Hide file tree
Showing 9 changed files with 79 additions and 11 deletions.
4 changes: 4 additions & 0 deletions Browserless/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
TOKEN=2cbc5771-38f2-4dcf-8774-50ad51a971b8
ENABLE_API_GET=true
WORKSPACE_DELETE_EXPIRED=true
WORKSPACE_EXPIRE_DAYS=1
1 change: 1 addition & 0 deletions Browserless/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/.env
2 changes: 2 additions & 0 deletions Browserless/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ARG CONTAINER_VERSION=${CONTAINER_VERSION}
FROM browserless/chrome:${CONTAINER_VERSION}
36 changes: 34 additions & 2 deletions Nginx/conf/app.conf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ server {

server {
listen 80;
server_name database.blog.local;
server_name database.local;
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-NginX-Proxy true;
Expand All @@ -36,10 +36,42 @@ server {

server {
listen 80;
server_name supervisor.blog.local;
server_name supervisor.local;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_pass http://supervisor:9001;
}
}

server {
listen 80;
server_name rent.local;
root /var/www/html/rent/public;
index index.php;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass php-fpm:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
}

server {
listen 80;
server_name browserless.local;
location / {
proxy_pass http://browserless:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
1 change: 1 addition & 0 deletions Php-fpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ ARG CONTAINER_VERSION=${CONTAINER_VERSION}
FROM php:${CONTAINER_VERSION}-fpm-alpine

RUN apk --update --no-cache add build-base \
busybox-extras \
$PHPIZE_DEPS \
libjpeg-turbo-dev \
imagemagick-dev \
Expand Down
1 change: 1 addition & 0 deletions Supervisor/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ ARG CONTAINER_VERSION=${CONTAINER_VERSION}
FROM php:${CONTAINER_VERSION}-fpm-alpine

RUN apk --update --no-cache add build-base \
busybox-extras \
$PHPIZE_DEPS \
libjpeg-turbo-dev \
imagemagick-dev \
Expand Down
17 changes: 13 additions & 4 deletions Supervisor/config/scheduler.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
[program:application-name]
[program:schedule_blog]
process_name=%(program_name)s_%(process_num)02d
command=php /var/www/html/blog/artisan schedule:run >> /dev/null 2>&1
command=php /var/www/html/blog/artisan schedule:run
autostart=true
autorestart=true
numprocs=2
redirect_stderr=true
numprocs=1
redirect_stderr=true
stopwaitsecs=3600
[program:schedule_rent]
process_name=%(program_name)s_%(process_num)02d
command=php /var/www/html/rent/artisan schedule:run
autostart=true
autorestart=true
numprocs=1
redirect_stderr=true
stopwaitsecs=3600
25 changes: 21 additions & 4 deletions Supervisor/config/workers.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,24 @@
[program:application-name]
[program:blog_default]
process_name=%(program_name)s_%(process_num)02d
command=php /var/www/html/blog/artisan queue:work --sleep=3 --tries=3 --daemon
command=php /var/www/html/blog/artisan queue:work --queue=default --sleep=3 --tries=3
autostart=true
autorestart=true
numprocs=8
redirect_stderr=true
numprocs=1
redirect_stderr=true
stopwaitsecs=3600
[program:rent_default]
process_name=%(program_name)s_%(process_num)02d
command=php /var/www/html/rent/artisan queue:work --queue=default --sleep=3 --tries=3 --daemon
autostart=true
autorestart=true
numprocs=1
redirect_stderr=true
stopwaitsecs=3600
[program:rent_emails]
process_name=%(program_name)s_%(process_num)02d
command=php /var/www/html/rent/artisan queue:work --queue=emails --sleep=3 --tries=3 --daemon
autostart=true
autorestart=true
numprocs=1
redirect_stderr=true
stopwaitsecs=3600
3 changes: 2 additions & 1 deletion Workspace/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
ARG CONTAINER_VERSION=${CONTAINER_VERSION}
FROM php:${CONTAINER_VERSION}-fpm-alpine

# busybox telnet <ip> <port>
RUN apk --update --no-cache add build-base \
busybox-extras \
$PHPIZE_DEPS \
libjpeg-turbo-dev \
imagemagick-dev \
Expand Down

0 comments on commit d381df5

Please sign in to comment.