Skip to content

Commit

Permalink
Merge pull request #1 from alexjustesen/config-with-yml
Browse files Browse the repository at this point in the history
Config with yml
  • Loading branch information
alexjustesen authored Sep 13, 2022
2 parents eb5341a + c1b109d commit f060e17
Show file tree
Hide file tree
Showing 26 changed files with 24,472 additions and 371 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
/public/storage
/storage/*.key
/vendor
config.yml
.env
.env.backup
.phpunit.result.cache
Expand Down
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Everything needs to be reviewed by Alex
* @alexjustesen
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
/public/storage
/storage/*.key
/vendor
config.yml
.env
.env.backup
.phpunit.result.cache
Expand Down
2,102 changes: 2,102 additions & 0 deletions .phpstorm.meta.php

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,33 @@ FROM serversideup/php:8.1-fpm-nginx
# Install addition packages
RUN apt-get update && apt-get install -y \
cron \
supervisor \
php8.1-bcmath \
php8.1-pgsql \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/* \
&& rm -f /etc/cont-init.d/50-laravel-automations
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*

# Install Speedtest cli
RUN curl -s https://packagecloud.io/install/repositories/ookla/speedtest-cli/script.deb.sh | bash \
&& apt-get install -y speedtest

# Copy package configs
COPY docker/deploy/cron/scheduler /etc/cron.d/scheduler
COPY docker/deploy/entrypoint /usr/local/bin/entrypoint
COPY docker/deploy/etc/cont-init.d/ /etc/cont-init.d/
COPY docker/deploy/supervisord.conf /etc/supervisor/conf.d/supervisord.conf

RUN chmod 0644 /etc/cron.d/scheduler \
&& crontab /etc/cron.d/scheduler \
&& chmod +x /usr/local/bin/entrypoint
COPY docker/deploy/etc/services.d/ /etc/services.d/

# Copy app
COPY . /var/www/html
COPY .env.docker .env

# Install app dependencies
RUN composer install --no-interaction --prefer-dist --optimize-autoloader --no-dev \
&& chown -R 9999:9999 /var/www/html
&& mkdir -p /app \
&& mkdir -p storage/logs \
&& php artisan optimize:clear \
&& chown -R webuser:webgroup /var/www/html \
&& rm -rf /etc/cont-init.d/50-laravel-automations \
&& chmod 0644 /etc/cron.d/scheduler \
&& crontab /etc/cron.d/scheduler \
&& cp docker/deploy/entrypoint.sh /entrypoint \
&& chmod +x /entrypoint

ENTRYPOINT ["entrypoint"]
ENTRYPOINT ["/entrypoint"]
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ docker run -itd --name speedtest-tracker \
-p 8080:80 \
-e "PHP_POOL_NAME=speedtest-tracker_php" \
-e "DB_CONNECTION=sqlite" \
-e "DB_DATABASE=/appdata/database.sqlite" \
-v speedtest-tracker_app:/appdata \
-e "DB_DATABASE=/app/database.sqlite" \
-v speedtest-tracker_app:/app \
speedtest-tracker
```

Expand Down
Loading

0 comments on commit f060e17

Please sign in to comment.