User:Curb Safe Charmer/Refilldev
Appearance
Given the frequent outages of Refill I wanted to be able to debug the code. I have a software development background, but it was all using Windows rather than Linux and was prior to things like Docker so it is a bit of a learning curve.
This is how I went about setting up a development environment for Refill. The instructions assume a working knowledge of Windows and Azure.
For those who don't want to use Linux at all, the development environment can be set up on Windows - see Wikipedia:Refill/Windows.
Azure VM
|
---|
Windows Subsystem for Linux
|
---|
- install https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl (described at https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl)
- in visual studio code, open a remote window using the green arrows in the bottom left hand corner
- install python extensions
Set up development environment
[edit]- In Chrome, download and install https://www.python.org/downloads/ (check the box to add to the path)
- In Chrome, download and install node.js
- Open Visual Studio Code
- Select 'code in any language' -> browse language extensions
- Install the Python and Docker extensions
- Close the extensions start page tab
- Click 'source control' in left hand pane, click on 'install git', open using Chrome.
- At https://git-scm.com/downloads click Windows. In the installer, select all checkboxes. Change to 'Use Windows default console window'
- Close and reopen Visual Studio Code.
- Click on the Explorer in the left hand pane, then Clone Repository, Clone from Github. Allow. Continue. Log in to Github.
- Copy the token and paste into box in VS Code
- Download and install Docker Desktop (Windows will need to restart)
Set up ReFill
[edit]- Click 'clone repository' again, enter https://github.com/zhaofengli/refill
- Select the 'documents' folder as the root for the repo, then open it
- In a command window, change directory to \web under the Refill folder and run the following
- npm install flask
- npm install node-sass
- npm install yarn
- yarn upgrade caniuse-lite browserslist
- npm audit fix
- npm run dev
Backend
[edit]- npm install celery
- npm install webpack
- npm install webpack-cli
- npm install virtualenv
- docker pull redis
- pip install flask
- pip install flask_cors
- pip install flask_restplus
- pip install Werkzeug==0.16.0
- pip install dateparser
Docker
|
---|
Troubleshooting
[edit]It is possible you may have to append a folder to the path. This is done as follows:
- set PATH=%PATH%;C:\your\path\here\