-
Notifications
You must be signed in to change notification settings - Fork 18
Setup: Dev
ODDSLINGERS_ENV=DEV
There are different ways to run the dev environment:
- Run the docker-compose file
- Run the automated setup script
- Manually install and setup everything
- Run the ansible playbook
Each has its tradeoffs, but generally manually installing is recommended so you know how everything works.
First, read the Layers of the Stack, Configuration, and Folder Locations pages to get a feel for how the project is laid out.
First, read a little about how to install docker and docker compose for your specific OS.
Later, you can follow the next steps for running oddslingers by docker-compose:
git clone https://github.com/Monadical-SAS/oddslingers.poker.git
cd oddslingers.poker
# Add to /etc/hosts -> 127.0.0.1 oddslingers.l
docker-compose run django ./manage.py migrate
docker-compose run django ./manage.py createsuperuser
docker-compose up
# Open http://oddslingers.l
From here, you could begin to do changes in the codebase and to run these commands for developing tasks:
# For installing yarn packages
docker-compose run --rm django oddslingers yarn_install
# For testing
docker-compose run --rm django oddslingers testpy
docker-compose run --rm django oddslingers testjs
# For linting
docker-compose run --rm django oddslingers lintpy
docker-compose run --rm django oddslingers lintjs
# For rebuilding docker images and update the python packages
docker-compose build
Some useful docker-compose commands:
# Start the stack
docker-compose start
# Stop the stack
docker-compose stop
# List the services
docker-compose ps
# Init the stack
docker-compose up
# Destroy the stack (This delete the docker containers)
docker-compose down
You can get more information about docker-compose running in Docker Compose page.
Follow the README.md quickstart instructions and run the one for your system:
bin/setup-dev-mac
-
bin/setup-dev-ubuntu
- Automated Setup Script Dev Ubuntu
Manual setup is usually a good way to understand which are the different technologies oddslingers use. It is recommended for devops and sysadmins. You can follow the steps described in the Manual setup page.
Ansible is a technology used to install software and to aprovisionate servers in a easy way. It is a good method for understading the steps to install oddslingers in a higher level than a bash script. And it is useful for remote installations. Check the steps to install oddslingers by using an ansible playbook in the Ansible setup page.