You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+32-3Lines changed: 32 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -211,11 +211,40 @@ add this to the file:
211
211
212
212
####Setting up Docker
213
213
Refer this link for [setting up docker](https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository"setting up docker") (setup via repository).
214
+
After successfully installing docker switch to the Docker directory `cd playground/backend/docker`
215
+
and build the docker image `sudo docker build -t playground-prod .` .
214
216
215
217
#### Setting up the backend server
216
-
1. Go to the backend folder `cd playground/backend`
217
-
2. Make a directory for virtual environment(this will be useful when setting up the service) using `mkdir .venv` and install all required modules using `pipenv install`
218
-
3. Start the server using:
218
+
1. Go to the backend folder `cd playground/backend`.
219
+
2. Install pipenv to install packages from the pipfile
220
+
`sudo pip install pipenv`
221
+
3. Make a directory for virtual environment(this will be useful when setting up the service) using `mkdir .venv` and install all required modules using `pipenv install`
222
+
4. Start the server using:
219
223
```sudo pipenv run gunicorn --bind 0.0.0.0:5000 wsgi:app```
220
224
221
225
You'll now be able to use the app. You should also setup a service for the gunicorn server so that it starts automatically when the server boots.
226
+
227
+
#### Setting up the service
228
+
1. Create a service file for our app `sudo nano /etc/systemd/system/backend.service`
229
+
2. Write the following configuration:
230
+
```
231
+
[Unit]
232
+
Description=Gunicorn instance to serve backend for playground
0 commit comments