Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix archiving/backup, update pdf library, clean up Dockerfile #3

Merged
merged 6 commits into from
Aug 24, 2020

Conversation

squ1rr3lly
Copy link
Owner

Everything now runs smoothly with docker-compose and the shaark Dockerfile would be more usable in other environments. I think this is production-ready, and would even be able to scale in a K8s/ECS/etc. deployment. I also made some code updates outside of just Docker, primarily switching the library used for PDF archiving to something that seemed better supported (spatie/browsershot).

Main changes:

Code:

  • Replaced nesk/puphpeteer with spatie/browsershot; seems better supported and Shaark uses a lot of other spatie packages. I think this will be much easier to maintain with same functionality.
  • The PDF Archive test gets http://example.com instead of app->(home)

Dockerfile:

  • Updated image to php:alpine
  • Chromium and spatie/browsershot for archiving
  • Install youtube-dl for archiving
  • Created regular user "shaarkuser" that runs the server with necessary capabilities set on entrypoint script; no longer have to run as root
  • Set up crontab for backups

docker-compose:

  • made the app/storage directory a volume; stores archives, backups, and all settings through rebuild/redeploy
  • SHAARK_ADMIN_PASSWORD env variable allows setting initial admin user pass; defaults to "secret"
  • Sets random mysql root password

Entrypoint:

  • Cleaned up logic for determining when migrations/seeding should be performed
  • Starts the artisan work queue

@squ1rr3lly squ1rr3lly merged commit 96f5034 into dev Aug 24, 2020
@squ1rr3lly squ1rr3lly deleted the fix_archiving branch January 30, 2023 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant