mirror of
https://github.com/akuker/RASCSI.git
synced 2024-11-26 13:49:21 +00:00
Update readme for dev setup of web
This commit is contained in:
parent
968d34bb14
commit
b5d82c1037
@ -1,12 +1,35 @@
|
||||
# RaSCSI Web
|
||||
|
||||
## Mocking for local development
|
||||
## Setup local dev env
|
||||
|
||||
Set a few env vars to point to the mock scripts and base dir
|
||||
|
||||
```
|
||||
BASE_DIR=/tmp/images/
|
||||
PATH=$PATH:`pwd`/mock/bin/
|
||||
```bash
|
||||
# Make a virtual env named venv
|
||||
$ python3 -m venv venv
|
||||
# Use that virtual env in this shell
|
||||
$ source venv/bin/activate
|
||||
# Install requirements
|
||||
$ pip install -r requirements.txt
|
||||
# Use mocks and a temp dir - start the web server
|
||||
$ BASE_DIR=/tmp/images/ PATH=$PATH:`pwd`/mock/bin/ python3 web.py
|
||||
```
|
||||
|
||||
Edit response to commands in `mock/bin/*`
|
||||
### Mocks for local development
|
||||
|
||||
You may edit the files under `mock/bin` to simulate rascsi command responses.
|
||||
|
||||
## Pushing to the Pi via git
|
||||
|
||||
Setup a bare repo on the rascsi
|
||||
```
|
||||
$ ssh pi@rascsi
|
||||
$ mkdir /home/pi/dev.git && cd /home/pi/dev.git
|
||||
$ git --bare init
|
||||
Initialized empty Git repository in /home/pi/dev.git
|
||||
```
|
||||
|
||||
Locally
|
||||
```
|
||||
$ cd ~/source/RASCSI
|
||||
$ git remote add pi ssh://pi@rascsi/home/pi/dev.git
|
||||
$ git push pi master
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user