-
Notifications
You must be signed in to change notification settings - Fork 4
/
README
72 lines (46 loc) · 1.31 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
Using this project:
==================
- Install docker and docker-compose
- Then run:
docker-compose up --build
What will that ^ do?
===================
--> Launch two instances of Neo4J
+ one for development and one for testing
--> Launch the flask builtin server
+ which will serve the endpoints, templates, etc.
+ for production, i.e. setup a gunicorn worker and deploy on heroku
Project Structure:
=================
--> models.py:
---------
definition of nodes and relationships
that comprise the model
--> factory.py:
----------
the flask app factory pattern
--> extensions.py:
-------------
all flask extensions used get initialized here
--> views.py:
--------
the endpoints for the API/server
--> _cliapp.py:
----------
the entrypoint to the flask app instance
for this project
Running the tests:
=================
docker-compose exec web pytest
Other hints:
===========
Try these in a new terminal:
(After running docker-compose up --build)
- docker-compose exec web sh
- docker-compose exec web python
- Dockerfile and docker-compose.yml is
where the magic happens
References:
==========
- To learn more on Docker: https://diveintodocker.com/courses/dive-into-docker
- py2neo docs: http://py2neo.org/v3/index.html