This is the main repository for the CnCNet Ladder API.
.env-example
to .env
and configure docker related env. cncnet-api/.env-example
to .env
and configure laravel related env.If you are setting up your developpement environment, you can skip this chapter and go to the Development section.
docker-compose build
docker-compose up -d
docker exec cncnet_ladder_app composer install && php artisan migrate
docker exec cncnet_ladder_app php artisan key:generate
.npm run prod
If you are setting up a prod or staging environment, you can skip this chapter and go to the Production section.
docker-compose -f docker-dev-compose.yml build
docker-compose -f docker-dev-compose.yml up -d
to build and start the docker containerdocker exec cncnet_ladder_app composer install
docker exec cncnet_ladder_app php artisan key:generate
. This will output the new key, you must manually copy past it into your cncnet-api/.env
.After changing the .env :
- rebuild docker with
docker-compose -f .\docker-dev-compose.yml up -d
.- clear cache with
docker exec cncnet_ladder_app php artisan optimize:clear
docker exec cncnet_ladder_app php artisan migrate
for an empty databaseYou are ready to go !
npm run watch
docker exec -it cncnet_ladder_app /bin/bash
Replace user with the host user
ln -s /home/user/site/storage/app/avatars /home/user/site/public/avatars
ln -s /home/user/site/storage/app/media /home/user/site/public/media
You either forgot to generate the key or your env variable are not up to date
docker exec cncnet_ladder_app php artisan key:generate
ordocker-compose -f .\docker-dev-compose.yml up -d
.Your database is empty or missing tables
docker exec cncnet_ladder_app php artisan migrate