The official repository for Project City Build's homepage and related web services.
- Frameworks: Laravel 5.6, ReactJS 16
- Environment: Docker (and Docker-Compose)
- CI/CD: Travis CI, Codecov
All branches, commits and pull-requests are continuously tested
Docker is an optional requirement. If you do not wish to use Docker for local dev work, feel free to go about it in the usual way by working from the
Without Docker, you will need to manually install:
- PHP 7.1.3 or greater
Can I contribute?
Absolutely. Feel free to fork and send pull requests any time. I'd be thrilled to have some help.
If you are using Docker (which I highly recommend):
- Copy the root
.env.examplefile and rename it to
.env. Fill in your desired new database details.
- Copy the
src/.env.examplesfile, rename it to
src/.envand fill in at least your database connection details, matching the first step.
docker-compose up -dto boot up the stack
- Enter the php-fpm container
docker exec -it <php-fpm id> sh(use
docker psto find the id)
- Download PHP dependencies by running
- Download JS dependencies by running
- Generate a Laravel application key
php artisan key:generate
- Set up the database by running
php artisan migrate --seed
- From the src directory, run
npm run watch. This will open up a BrowserSync instance in your default browser with hot-reloading.
- If your docker-machine IP is different to the default (192.168.99.100), you will need to change the BrowserSync proxy setting in
phpunitinside the php-fpm docker container
Note when using Docker:
Because none of the dependencies are actually installed on your computer, you will need to enter the php-fpm container to run any Composer, NPM or PHP commands.
docker pswill print a table of all containers running. Look for the php-fpm container id.
docker exec -it <php-fpm container id> shwill enter the container in interactive mode.
- Alternatively you can run commands from the host. For example
docker exec <php-fpm container id> phpunit
- When running inside a Docker container,
npm run watchwill not automatically open a browser for you. Navigate to 192.168.99.100:3000 (or whatever your docker-machine IP is) in the browser of your computer.
- If the database schema changes, remember to run
php artisan migratefrom the src folder to ensure you always have the latest schema.