Skip to content

wikiclimb/yii2-backend

Repository files navigation

WikiClimb backend

codeception tests workflow


WikiClimb logo

WikiClimb's PHP backend.

About WikiClimb

To learn more about WikiClimb and its mission, visit the organization's profile page.

About this repository

This repository contains a Yii2/PHP multi-tier application that serves as WikiClimb's backend.

Each tier does the following:

  • api: code that is not specific to a particular version of the API.
  • apiv1: code that maybe updated with an API version update.
  • backend: this tier does not do much currently, in the future it could serve as an admin console.
  • common: code that is common between all tiers, most commonly configuration and models.
  • console: code that gets called from the console. Maintenance scripts, migrations...
  • frontend: code that needs to run on the web and it is better served from outside an application, password recovery, privacy polity, documentation...

Contributions are welcome.

Running the project locally

Make sure that:

  • Git is installed
  • PHP8 is installed. The system runs in a container with PHP8 but it will be easier to install the dependencies if composer can access it.
  • You need to be able to run composer commands
  • You need to be able to run docker and docker-compose commands from the terminal

Clone the repository

git clone https://github.com/wikiclimb/yii2-backend.git

Navigate to the root of the project and install the composer dependencies, for example using composer.phar. (PHP >= 8.0 and a copy of composer.phar needed)

php composer.phar install

Start the docker containers.

docker-compose up -d

Initialize the environment, for example to Development, it could also be Test or Production.

php init --env=Development --overwrite=All

Note that for production environments, you need to manually configure the application with the correct web server, database server and credentials, before you can use it.

If you want to use the debugger you will also need to configure your IP as allowed.

Configuration for the test and development environment, using the docker setup should be in place after running the command.

Run the database migrations.

./yii migrate –interactive=false
./yii_test migrate --interactive=false

Execute the tests.

vendor/bin/codecept run

That is all, happy development!

WikiClimb logo

About

PHP/Yii2 multi-tier backend for WikiClimb

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published