jobapis/jobs-to-mail
Composer 安装命令:
composer create-project jobapis/jobs-to-mail
包简介
Your personal job-search assistant.
关键字:
README 文档
README
Your personal job-search assistant
About
JobsToMail is an open source web application that allows users to sign up to receive emails with jobs from one of several job boards supported by the JobApis project. Users can sign up to receive jobs for free at jobs-to-mail.herokuapp.com or use the setup instructions below to run the application on their own server.
This application is built on Laravel 5.5 using the Jobs Multi and Jobs Common packages. The frontend uses Bootstrap v4 and Gulp.
Mission
JobApis makes job board and company data more accessible through open source software. To learn more, visit JobApis.com, or contact us at admin@jobapis.com.
Setup
Requirements
This application is only designed to work with PHP 7.0+ and Postgres 9.5+. Some backwards compatibility may be possible, but is not officially supported at this time.
Installation requires the following:
Local installation
The recommended installation method is Composer.
- Use composer to create a new project:
composer create-project jobapis/jobs-to-mail
-
Copy
.env.exampleto.envand customize it with your environmental variables. -
Run
npm install && gulpto build the frontend. -
Run the built-in web server to serve the application:
php artisan serve. -
Visit the local application at
localhost:8000. -
Once at least one user has signed up, you can run the job collection and email command:
php artisan jobs:email.
Docker installation
After you've got Docker installed and running:
-
Install composer dependencies:
docker run --rm -v $(pwd):/app composer:latest install -
Copy
.env.exampleto.envand customize it with your environmental variables. -
Run
docker-compose buildand thendocker-compose up -dto get the services running. -
Run
npm install && node node_modules/.bin/gulpto build the frontend. -
Run migrations:
docker exec jobstomail_web_1 php artisan migrate. -
Run the collect and email command:
docker exec jobstomail_web_1 php artisan jobs:email.
You can run tests with docker exec jobstomail_web_1 vendor/bin/phpunit.
Heroku installation
-
After it's deployed, you should be able to visit your app and see the home page.
-
Set an application key by running
heroku run "php artisan key:generate --show" --app=j2mand adding the key that is displayed to your app's config variables. -
Add a job in Heroku Scheduler to run
php artisan jobs:emailevery night. This will ensure that users receive their emails.
Server installation
Additional Requirements
- A server running Linux Ubuntu 16.04+
- PHP-FPM
- NGINX
- Use composer to create a new project:
composer create-project jobapis/jobs-to-mail
-
Copy
.env.exampleto.envand customize it with your environmental variables. -
Run
npm install && gulpto build the frontend. -
Point NGINX to serve to the
/publicdirectory. Your NGINX config block should look something like this:
server {
listen 80;
server_name yourdomain.com;
root /home/user/jobs-to-mail/public;
index index.html index.htm index.php;
charset utf-8;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
-
Ensure that PHP-FPM is running, and ensure that your site is running at your domain.
-
Create a cron job to run the job collection and notification process nightly:
php artisan jobs:email.
Command Line
After users sign up for a job search, the only thing needed to collect jobs and send them emails is the following command:
php artisan jobs:email
This command will loop through each user, collect jobs based on their search criteria, and then email them when their list has been compiled.
Because this job search can take a long time, it is best to use a worker and run the job in the background (via cron job). Instructions for setting this up in Heroku are above, but if you have trouble, you can post a question to the Issues tab in the Github repository.
You can also run this job for only one email address in your system when testing or debugging:
php artisan jobs:email --email=karl@jobstomail.com
Testing
Tests are run using PHPUnit. We also employ Faker to help with producing fake data and Mockery to mock dependencies in unit tests.
- Run all tests
vendor/bin/phpunit
Code coverage reports are automatically generated, and can be found in the /build directory after running the test suite.
Seeding data
If you're doing local development, you may find it handy to seed the database with some test data. Using Laravel's seed commands you can do just that:
- Truncate and seed the database tables
php artisan db:seed
- Seed only
php artisan db:seed --class=TestingDatabaseSeeder
- Truncate only
php artisan db:seed --class=DatabaseTruncater
Note: Truncation is permanent, so be careful running this in your production environment.
Contributing
Contributions are welcomed and encouraged! Please see JobApis' contribution guidelines for details, or create an issue in Github if you have any questions.
Legal
Disclaimer
This package is not affiliated with or supported by any job boards and we are not responsible for any use or misuse of this software.
License
This package uses the Apache 2.0 license. Please see the License File for more information.
Copyright
Copyright 2016, Karl L. Hughes.
jobapis/jobs-to-mail 适用场景与选型建议
jobapis/jobs-to-mail 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 58 次下载、GitHub Stars 达 101, 最近一次更新时间为 2016 年 09 月 25 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「emails」 「job boards」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 jobapis/jobs-to-mail 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 jobapis/jobs-to-mail 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 jobapis/jobs-to-mail 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Making it simple to integrate your application with job api providers.
A laravel package for blacklisting or whitelisting specific email providers or domains
Provides a possibility to auto-setup crontabs required for project based on configuration file.
SlimQ Enables You to push jobs to background workers
PHP client for Kue priority job queue API
A lightweight task queue on top of rybakit/phive-queue
统计信息
- 总下载量: 58
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 101
- 点击次数: 12
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Apache
- 更新时间: 2016-09-25