-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Create LICENSE * added dockerfile * added gitginore * removed node-yarn from scripts * added start-container * fixed user and group add * updated readme, removed unnecessary deps * add deployer to sudoers * adding wheel to deployer group * adding wheel to deployer group * adding sudo * adding sudo * adding deployer to wheel * adding deployer to wheel * adding deployer to wheel * adding deployer to wheel * adding deployer to wheel * adding deployer to wheel * adding deployer to wheel * adding deployer to wheel * added exif to the php extensions * Proofread (#1) ✍️ Fixed some typos * updated readme.md to migrate to laramatics/container * Updated readme for cron jobs * Renamed cron settings and executable file * changed scripts path from local to global * Changed nginx-php supervisor configuration name. * Added start-worker script * Added start-worker script to Dockerfile * we won't cleanup install-php-extensions for CI to be able to add more extensions * Update README.md Added FAQ section * Updated PHP to 8.2.1 Co-authored-by: A.Ansari <[email protected]> Co-authored-by: root <[email protected]>
- Loading branch information
1 parent
735f521
commit 59b5cc1
Showing
6 changed files
with
32 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
ARG PHP_VERSION=8.1.1 | ||
ARG PHP_VERSION=8.2.1 | ||
FROM php:${PHP_VERSION}-fpm-alpine | ||
LABEL maintainer="Pezhvak <[email protected]>" | ||
# NOTE: ARGs before FROM cannot be accessed during build time (https://docs.docker.com/engine/reference/builder/#understand-how-arg-and-from-interact) | ||
|
@@ -12,8 +12,12 @@ RUN chmod +x /usr/local/bin/install-php-extensions | |
# Copy Scripts | ||
COPY scripts /tmp | ||
RUN chmod +x /tmp/*.sh | ||
COPY scripts/start-container /usr/local/bin | ||
RUN chmod +x /usr/local/bin/start-container | ||
COPY scripts/start-container /usr/bin | ||
COPY scripts/start-cron /usr/bin | ||
COPY scripts/start-worker /usr/bin | ||
RUN chmod +x /usr/bin/start-container | ||
RUN chmod +x /usr/bin/start-cron | ||
RUN chmod +x /usr/bin/start-worker | ||
|
||
# Install | ||
RUN ash /tmp/install-packages.sh | ||
|
@@ -32,10 +36,13 @@ RUN rm -rf /tmp/* | |
EXPOSE 80 | ||
|
||
# Services supervisor config | ||
COPY ./configs/supervisord.conf /etc/supervisor.d/supervisord.conf | ||
COPY ./configs/supervisord.conf /etc/supervisor.d/php-nginx.conf | ||
|
||
# Override nginx's default config | ||
COPY ./configs/nginx.conf /etc/nginx/http.d/default.conf | ||
|
||
# Set crontab configurations | ||
COPY ./configs/crontab.txt /etc/crontabs/root | ||
|
||
CMD ["/usr/bin/supervisord", "-n","-c", "/etc/supervisord.conf"] | ||
ENTRYPOINT ["start-container"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* * * * * cd /var/www/html && php artisan schedule:run >> /dev/stdout 2>&1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/usr/bin/env ash | ||
crond -f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env ash | ||
|
||
if [ $# -gt 0 ]; then | ||
exec exec /usr/local/bin/php /var/www/html/artisan queue:work "$@" | ||
else | ||
exec /usr/local/bin/php /var/www/html/artisan queue:work --timeout=3600 --tries=3 --no-interaction | ||
fi |