Browse Source

Make a few moves towards getting this to deploy

master
decentral1se 6 months ago
parent
commit
4c03ac4499
Signed by: Luke Murphy <lukewm@riseup.net> GPG Key ID: 5E2EF5A63E3718CC
3 changed files with 12 additions and 5 deletions
  1. 1
    1
      README.md
  2. 7
    2
      makefile
  3. 4
    2
      requirements.txt

+ 1
- 1
README.md View File

@@ -47,7 +47,7 @@ $ pip install -r requirements.txt
47 47
 ### Run the server
48 48
 
49 49
 ```
50
-$ make serve
50
+$ make dev-serve
51 51
 ```
52 52
 
53 53
 ### Layers of the Onion

+ 7
- 2
makefile View File

@@ -1,9 +1,14 @@
1
-ARCHIVE_DIR := ./vocoder/archive
1
+PROD_PORT    := :9090
2
+PROD_WORKERS := 4
3
+ARCHIVE_DIR  := ./vocoder/archive
2 4
 
3 5
 default: serve
4 6
 
5
-serve:
7
+dev-serve:
6 8
 	@FLASK_ENV=development FLASK_APP=vocoder.server flask run
7 9
 
8 10
 clear-archive:
9 11
 	@rm -rf $(ARCHIVE_DIR)/*
12
+
13
+prod-serve:
14
+	@gunicorn --workers $(PROD_WORKERS) --bind $(PROD_PORT) vocoder.server:app

+ 4
- 2
requirements.txt View File

@@ -1,2 +1,4 @@
1
-Flask==1.1.1
2
-Flask-Cors==3.0.8
1
+fabric==2.5.0
2
+flask-cors==3.0.8
3
+flask==1.1.1
4
+gunicorn==20.0.4

Loading…
Cancel
Save