Skip to content

Commit d2c9510

Browse files
authored
Environment and permission fixes (alexjustesen#51)
1 parent a5575ce commit d2c9510

File tree

11 files changed

+321
-398
lines changed

11 files changed

+321
-398
lines changed

.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/.git
2+
/.github
23
/.idea
34
/.vscode
45
/docker/8.1
@@ -10,6 +11,7 @@
1011
/storage/logs
1112
/vendor
1213
_ide_helper.php
14+
.editorconfig
1315
.env
1416
.env.backup
1517
.phpstorm.meta.php

.env.docker

Lines changed: 0 additions & 39 deletions
This file was deleted.

.env.example

Lines changed: 10 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,27 @@
11
APP_NAME="Speedtest Tracker"
2-
APP_ENV=local
2+
APP_ENV=production
33
APP_KEY=
4-
APP_DEBUG=true
4+
APP_DEBUG=false
55
APP_URL=http://localhost
66

7-
LOG_CHANNEL=stack
7+
LOG_CHANNEL=stderr
88
LOG_DEPRECATIONS_CHANNEL=null
99
LOG_LEVEL=debug
1010

11-
DB_CONNECTION=mysql
12-
DB_HOST=127.0.0.1
13-
DB_PORT=3306
14-
DB_DATABASE=speedtest_tracker
15-
DB_USERNAME=root
16-
DB_PASSWORD=
11+
DB_CONNECTION=sqlite
12+
# DB_HOST=127.0.0.1
13+
# DB_PORT=3306
14+
# DB_DATABASE=speedtest_tracker
15+
# DB_USERNAME=root
16+
# DB_PASSWORD=
1717

1818
BROADCAST_DRIVER=log
1919
CACHE_DRIVER=file
2020
FILESYSTEM_DISK=local
2121
QUEUE_CONNECTION=database
22-
SESSION_DRIVER=file
22+
SESSION_DRIVER=database
2323
SESSION_LIFETIME=120
2424

25-
MEMCACHED_HOST=127.0.0.1
26-
27-
REDIS_HOST=127.0.0.1
28-
REDIS_PASSWORD=null
29-
REDIS_PORT=6379
30-
3125
MAIL_MAILER=smtp
3226
MAIL_HOST=mailhog
3327
MAIL_PORT=1025
@@ -42,17 +36,3 @@ AWS_SECRET_ACCESS_KEY=
4236
AWS_DEFAULT_REGION=us-east-1
4337
AWS_BUCKET=
4438
AWS_USE_PATH_STYLE_ENDPOINT=false
45-
46-
PUSHER_APP_ID=
47-
PUSHER_APP_KEY=
48-
PUSHER_APP_SECRET=
49-
PUSHER_HOST=
50-
PUSHER_PORT=443
51-
PUSHER_SCHEME=https
52-
PUSHER_APP_CLUSTER=mt1
53-
54-
VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
55-
VITE_PUSHER_HOST="${PUSHER_HOST}"
56-
VITE_PUSHER_PORT="${PUSHER_PORT}"
57-
VITE_PUSHER_SCHEME="${PUSHER_SCHEME}"
58-
VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"

.phpstorm.meta.php

Lines changed: 0 additions & 121 deletions
Large diffs are not rendered by default.

Dockerfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
FROM serversideup/php:beta-8.1-fpm-nginx
22

3-
ENV PHP_POOL_NAME=speedtest-tracker_php
3+
# Add /config to allowed directory tree
4+
ENV PHP_OPEN_BASEDIR=$WEBUSER_HOME:/config/:/dev/stdout:/tmp
45

56
# Install addition packages
67
RUN apt-get update && apt-get install -y \
@@ -18,14 +19,16 @@ RUN curl -s https://packagecloud.io/install/repositories/ookla/speedtest-cli/scr
1819
COPY --chmod=644 docker/deploy/cron/scheduler /etc/cron.d/scheduler
1920
COPY --chmod=755 docker/deploy/etc/s6-overlay/ /etc/s6-overlay/
2021

22+
WORKDIR /var/www/html
23+
2124
# Copy app
2225
COPY --chown=webuser:webgroup . /var/www/html
23-
COPY .env.docker .env
2426

2527
# Install app dependencies
2628
RUN composer install --no-interaction --prefer-dist --optimize-autoloader --no-dev \
27-
&& mkdir -p /app \
2829
&& mkdir -p storage/logs \
2930
&& php artisan optimize:clear \
3031
&& chown -R webuser:webgroup /var/www/html \
3132
&& crontab /etc/cron.d/scheduler
33+
34+
VOLUME /config

0 commit comments

Comments
 (0)