django-orchestra/INSTALLDEV.md

40 lines
1.2 KiB
Markdown
Raw Normal View History

2015-05-04 14:46:03 +00:00
Development and Testing Setup
-----------------------------
If you are planing to do some development you may want to consider doing it under the following setup
2015-10-03 12:02:53 +00:00
1. Install Docker
```sh
curl https://get.docker.com/ | sh
2015-05-04 14:46:03 +00:00
```
2015-10-03 12:02:53 +00:00
2. Build a new image, create and start a container
2015-05-04 14:46:03 +00:00
```bash
2021-01-29 13:11:54 +00:00
curl -L https://raw.githubusercontent.com/ribaguifi/django-orchestra/master/scripts/containers/Dockerfile > /tmp/Dockerfile
2015-10-03 12:02:53 +00:00
docker build -t orchestra /tmp/
2015-10-03 12:17:15 +00:00
docker create --name orchestra -i -t -u orchestra -w /home/orchestra orchestra bash
2015-10-03 12:02:53 +00:00
docker start orchestra
docker attach orchestra
2015-05-04 14:46:03 +00:00
```
2015-10-08 15:26:28 +00:00
3. Deploy django-orchestra development environment, inside the container
2015-05-04 14:46:03 +00:00
```bash
2021-01-30 14:17:03 +00:00
bash <( curl -L https://raw.githubusercontent.com/ribaguifi/django-orchestra/master/scripts/containers/deploy.sh ) --dev
2015-05-04 14:46:03 +00:00
```
2015-10-03 12:02:53 +00:00
3. Nginx should be serving on port 80, but Django's development server can be used as well:
2015-05-04 14:46:03 +00:00
```bash
2015-10-03 12:02:53 +00:00
cd panel
2021-01-29 13:11:54 +00:00
python3 manage.py migrate
2015-10-03 12:02:53 +00:00
python3 manage.py runserver 0.0.0.0:8888
2015-05-04 14:46:03 +00:00
```
2015-10-03 12:02:53 +00:00
2015-05-04 14:46:03 +00:00
5. To upgrade to current master just re-run the deploy script
```bash
2015-10-03 20:06:16 +00:00
git pull origin master
2021-01-30 14:17:03 +00:00
bash <( curl -L https://raw.githubusercontent.com/ribaguifi/django-orchestra/master/scripts/containers/deploy.sh ) --dev
2015-05-04 14:46:03 +00:00
```