Stars: 545
Forks: 126
Pull Requests: 2210
Issues: 1521
Watchers: 31
Last Updated: 2023-09-14 12:09:54
Logistics & marketplace platform. Only for worker-owned business.
License: Other
Languages: PHP, Shell, JavaScript, CSS, Gherkin, Makefile, Dockerfile, SCSS, Twig, HTML
CoopCycle is a self-hosted platform to order meals in your neighborhood and get them delivered by bike couriers. The only difference with proprietary platforms as Deliveroo or UberEats is that this software is reserved to co-ops.
The main idea is to decentralize this kind of service and to allow couriers to own the platform they are working for. In each city, couriers are encouraged to organize into co-ops, and to run their very own version of the software.
The software is under active development. If you would like to contribute we will be happy to hear from you! All instructions are in the Contribute file.
Coopcycle-web is the main repo, containing the web API, the front-end for the website and the dispatch algorithm : Technical Overview. You can see it in action & test it here : https://demo.coopcycle.org
You can find a comprehensive list of our repos here : Our repos comprehensive list.
Install Docker and Docker Compose.
Use Docker for Mac which will provide you both docker
and docker-compose
.
Use Docker for Windows which will provide you both docker
and docker-compose
.
Depending on your platform, Docker could be installed as Native or you have to install Docker toolbox which use VirtualBox instead of Hyper-V causing a lot a differences in implementations.
If you have the luck to have a CPU that supports native Docker you can share your hard disk as a virtual volume for your appliances.
Docker doesn't work under Windows, you need to install linux in hypervisualization. Follow the recommendations here to activate the necessary features under windows 11 and make sure you have an administrator account https://docs.docker.com/desktop/troubleshoot/topics/
Download docker https://www.docker.com/products/docker-desktop/ Check in the BIOS that : -hypervisualization (HYPER-V) -Data Execution Prevention (DEP). You can also use the following procedure for DEP: Windows + r Search for sysdm.cpl Advanced system settings In Performance, select settings data execution prevention "enable for all except those I select...". click on apply
install, from your PowerShell WSL 2 terminal https://learn.microsoft.com/en-us/windows/wsl/install
configure your WSL 2 environment by creating a Linux administrator account. The password is not displayed (this is normal), so remember it. https://learn.microsoft.com/fr-fr/windows/wsl/setup/environment#file-storage
Follow the instructions for your distribution. docker-compose
binary is to be installed independently.
Make sure:
docker-compose
following instructions to get the latest version.CoopCycle uses OpenStreetMap to geocode addresses and provide autocomplete features.
To configure address autocomplete, choose a provider below, grab the credentials, and configure environment variables accordingly.
LOCATIONIQ_ACCESS_TOKEN
GEOCODE_EARTH_API_KEY
COOPCYCLE_AUTOCOMPLETE_ADAPTER=geocode-earth
COOPCYCLE_AUTOCOMPLETE_ADAPTER=locationiq
To configure geocoding, create an account on OpenCage, and configure the OPENCAGE_API_KEY
environement variable.
We have prebuilt some images and uploaded them to Docker Hub. To avoid building those images locally, you can pull them first.
docker-compose pull
cp .env.dist .env
docker-compose up
At this step, the platform should be up & running, but the database is still empty. To create the schema & initialize the platform with demo data, run:
make install
open http://localhost
docker-compose run php bin/console doctrine:schema:create --env=test
make phpunit
make behat
make mocha
make enable-xdebug
Note: If you've been working with this stack before you'll need to rebuild the php image for this command to work:
docker-compose build php docker-compose restart php nginx
.vscode/launch.json
of your workspace:{
"configurations": [
{
"name": "Listen for XDebug",
"type": "php",
"request": "launch",
"port": 9001,
"pathMappings": {
"/var/www/html": "${workspaceFolder}"
},
"xdebugSettings": {
"max_data": 65535,
"show_hidden": 1,
"max_children": 100,
"max_depth": 5
}
}
]
}
docker-compose restart php nginx
When pulling change from the remote, the database models may have changed. To apply the changes, you will need to run a database migration.
make migrations-migrate
The code is licensed under the Coopyleft License, meaning you can use this software provided: