Skip to content

Commit b937aaf

Browse files
committed
Merge branch 'release/0.8.0'
2 parents c17985b + df7e99e commit b937aaf

File tree

5 files changed

+37
-9
lines changed

5 files changed

+37
-9
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM php:7.4.2-fpm-alpine3.11
1+
FROM php:7.4.4-fpm-alpine3.11
22

33
ENV PHP_OPCACHE_VALIDATE_TIMESTAMPS="0" \
44
PHP_OPCACHE_MAX_ACCELERATED_FILES="10000" \
@@ -106,5 +106,5 @@ COPY ./root/.bashrc /root/
106106
RUN find /home/app -name "run-*.sh" -exec chmod -v +x {} \;
107107

108108
# run the application
109-
CMD /home/app/run-dev.sh
109+
CMD /home/app/run-prod.sh
110110
EXPOSE 8080

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ version: '3.7'
4545
services:
4646
app:
4747
build: .
48+
command: /home/app/run-dev.sh
4849
restart: unless-stopped
4950
environment:
5051
- PHP_OPCACHE_VALIDATE_TIMESTAMPS=1

etc/nginx/nginx.conf

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
user nginx;
22
worker_processes 4;
33

4-
error_log /var/log/nginx/error.log warn;
5-
pid /var/run/nginx.pid;
4+
error_log /dev/stdout error.log warn;
5+
pid /var/run/nginx.pid;
66

77
events {
88
worker_connections 1024;
@@ -11,18 +11,18 @@ events {
1111
}
1212

1313
http {
14-
include /etc/nginx/mime.types;
15-
default_type application/octet-stream;
14+
include /etc/nginx/mime.types;
15+
default_type application/octet-stream;
1616

1717
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
1818
'$status $body_bytes_sent "$http_referer" '
1919
'"$http_user_agent" "$http_x_forwarded_for"';
2020

21-
access_log /var/log/nginx/access.log main;
21+
access_log /dev/stdout access.log main;
2222

23-
sendfile on;
23+
sendfile on;
2424

25-
keepalive_timeout 65;
25+
keepalive_timeout 65;
2626

2727
include /etc/nginx/conf.d/*.conf;
2828
}

home/app/run-dev.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ yarn
1919
# migrate and setup database
2020
wait-for-it.sh mysql:3306
2121
php artisan migrate --force
22+
php artisan setup
2223

2324
# start the services
2425
exec runsvdir /etc/service

home/app/run-prod.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/usr/bin/env bash
2+
echo "Running via PROD script..."
3+
cd /opt/app
4+
5+
# make sure Laravel can write its own files
6+
mkdir -p /opt/app/storage/logs/
7+
touch /opt/app/storage/logs/laravel.log
8+
touch /opt/app/storage/logs/worker.log
9+
chown www-data:www-data -R /opt/app/storage
10+
chown www-data:www-data -R /opt/app/bootstrap/cache
11+
12+
# migrate and setup database
13+
wait-for-it.sh mysql:3306
14+
php artisan migrate --force
15+
php artisan setup
16+
17+
# build caches
18+
php artisan config:cache
19+
php artisan route:cache
20+
php artisan view:cache
21+
22+
# restart the Horizon supervisors
23+
php artisan horizon:restart
24+
25+
# start the services
26+
exec runsvdir /etc/service

0 commit comments

Comments
 (0)