百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
C

codecasts

> 编程语言
开源

CODECASTS 的源代码

199 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

CODECASTS 的源代码

CODECASTS

Application's GIT Repository. This document should be the ultimate guide on running and specs about the application source code.

Build status

Branch Environment URL Status Test Coverage Code Style
master production https://codecasts.com.br
develop staging https://staging.codecasts.com.br

Index

  • Build status
    • Development
      • Requirements
      • Operating the docker environment
        • Starting services
        • Stopping services
        • Running internal commands
        • List of Services
    • Coding Guide Lines
      • Style
      • Unit Testing

Development

For using the docker version (recommended) of the environment, you first need to stop local services like MySQL, Redis, Elasticsearch and webservers running on port 80.

Requirements

  • Docker >= 1.10.3.
  • docker-compose, if not already bundled in your docker install.
  • A virtual host named codecasts.app pointing to 127.0.0.1, this step is needed since the social login callbacks are using this URL.

Operating the docker environment

Starting services

  • Option 1: Keeping the output visible on the terminal
php
docker-compose up
  • Option 2 : Sending the output of the services to background
php
docker-compose up -d

Stopping services

  • Option 1: When the output is visible (started with option 1), just hit control + c to stop it.

  • Option 2: When the services are on background or failed to stop with control + c, you can stop them with the following command:

php
docker-compose down

Running internal commands

When commands like artisan are needed, those commands would need to run inside the docker containers, to do so, use the following sintax:

php
docker-compose run {service-name} {command-you-want-to-run}

For example. to run migrations, you can do:

php
docker-compose run app php artisan migrate

Another example, starting a terminal inside the MySQL service

php
docker-compose run mysql /bin/bash

List of Services

The service names can be located inside the docker-compose.yml file, right now, the following are enabled:

Service Description
cache Runs a Redis 3.2 Instance for Cache and queues
mysql Runs a MySQL 5.7 Instance for Database
app PHP and Caddy Instance that runs the apllication
queue A PHP-CLI container, running php artisan queue:listen command
elastic Elasticsearch instance for search indexing

Coding Guide Lines

Style

PSR-1 & PSR-2 should be enforced, a copy of php-cd-fixer is distributed along with the PHP Docker image, so the following command can automatically format the code before commiting:

php
docker-compose run app php-cs-fixer --diff --fixers=-psr1,-psr2 fix app

As a alternative, you can alias that command as psr2 or other name:

php
# Bash and ZSH
alias psr2="docker-compose run app php-cs-fixer --diff --fixers=-psr1,-psr2 fix"

# Fish shell
alias psr2 "docker-compose run app php-cs-fixer --diff --fixers=-psr1,-psr2 fix"

Unit Testing

Following the same structure of existing tests, the main rule it keep tests under the same namespace as the class being tested, in order to avoid useless imports and keep code cleaner

Code coverage as HTML is already ignored on git when generated on the coverage directory, to run tests with coverage reports, use

php
php vendor/bin/phpunit --coverage-html=coverage

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

PHP

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言