Browse Source

alpha release 0.0.1

master
jfinn 4 months ago
parent
commit
59921b0bf9
4 changed files with 56 additions and 2 deletions
  1. 16
    0
      Dockerfile
  2. 19
    0
      README.md
  3. 3
    2
      flask_server/app.py
  4. 18
    0
      requirements.txt

+ 16
- 0
Dockerfile View File

@@ -0,0 +1,16 @@
1
+# init a base image (Alpine is small Linux distro)
2
+FROM python:3.10-alpine
3
+# update pip to minimize dependency errors 
4
+RUN pip install --upgrade pip
5
+# define the present working directory
6
+WORKDIR /docker-flask-test
7
+# copy the contents into the working dir
8
+ADD . /docker-flask-test
9
+# run pip to install the dependencies of the flask app
10
+RUN pip install -r requirements.txt
11
+
12
+WORKDIR flask_server
13
+
14
+EXPOSE 5000
15
+# define the command to start the container
16
+CMD ["python","app.py"]

+ 19
- 0
README.md View File

@@ -3,6 +3,25 @@
3 3
 Jsyncdb synchronizes json compatible javascript objects
4 4
 This will be a monorepo for jsyncdb clients and servers
5 5
 
6
+to get the doccker for this:
7
+docker pull jfinn9c/jsyncdb
8
+
9
+I will update this with developer instructions in mid-late summer (I'm on a different project right now)
10
+
11
+if you do want this in the meantime message me (I'll improve code's readability soon)
12
+
13
+files that are needed to run the javascript client:
14
+ 
15
+jquery-3.5.1.min.js
16
+jsync_lib.js
17
+jsync_demo.js (you only need the function jsyncdb_init_helper and can point it at a different backend)
18
+
19
+
20
+
21
+
22
+
23
+
24
+
6 25
 **Author:** 
7 26
 [Joseph Innace](https://github.com/JInnace)
8 27
 

+ 3
- 2
flask_server/app.py View File

@@ -201,8 +201,9 @@ if __name__ == '__main__':
201 201
 	pass
202 202
 	# socketio.run(app, debug=True)
203 203
 	# app.run(debug=True,host='0.0.0.0')
204
-	app.run(debug=True,host='0.0.0.0',port="5001")
205
-	# app.run(debug=True,host='0.0.0.0',port="5000")
204
+	app.run(debug=True,host='0.0.0.0',port="5000")
205
+	# app.run(debug=True,host='0.0.0.0',port="5001")
206
+
206 207
 	# sock.run(app,host='0.0.0.0', debug=True,allow_unsafe_werkzeug=True)
207 208
 
208 209
 

+ 18
- 0
requirements.txt View File

@@ -0,0 +1,18 @@
1
+async-timeout==4.0.3
2
+bidict==0.23.1
3
+blinker==1.7.0
4
+click==8.1.7
5
+colorama==0.4.6
6
+Flask==3.0.3
7
+flask-sock==0.7.0
8
+Flask-SocketIO==5.3.6
9
+h11==0.14.0
10
+itsdangerous==2.1.2
11
+Jinja2==3.1.3
12
+MarkupSafe==2.1.5
13
+python-engineio==4.9.0
14
+python-socketio==5.11.2
15
+redis==5.0.3
16
+simple-websocket==1.0.0
17
+Werkzeug==3.0.2
18
+wsproto==1.2.0

Loading…
Cancel
Save