Skip to content

Commit 810126b

Browse files
committed
add documentation about using development docker setup
1 parent 4c06786 commit 810126b

File tree

1 file changed

+32
-1
lines changed

1 file changed

+32
-1
lines changed

README.md

+32-1
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,35 @@ Apart from contributing LoC, you can help us by discussing some of the techincal
6161

6262
### Local environment setup
6363

64-
In order to know the requirements and setting up the project and database locally, visit [Development Workflow wiki](https://github.com/kshitij10496/hercules/wiki/Development-Workflow)
64+
You can develop on and test hercules using Docker. Make sure that docker and
65+
docker-compose are installed on your computer before following the steps below.
66+
67+
1. Start the app and DB containers
68+
69+
```sh
70+
cd dev-env
71+
docker-compose up --build -d
72+
```
73+
74+
2. Restore the initial data to your DB container's database
75+
76+
```sh
77+
cd dev-env/init-data
78+
./restore_init_data.sh
79+
```
80+
81+
Now, you should be able to access the API. You can test this by visiting:
82+
`http://localhost:8070/api/v1/course/timetable/ME30005` or running:
83+
84+
```sh
85+
curl http://localhost:8070/api/v1/course/timetable/ME30005
86+
```
87+
88+
This setup uses [fresh](https://github.com/pilu/fresh) to rebuild the server
89+
binary and restart the server whenever files are edited on the host machine. So,
90+
you can edit the files on your host machine and save them. Wait for a while, and
91+
your new code will be built and served at the same location.
92+
93+
You can look at the app logs using `docker logs -f devenv_hercules_api_1`.
94+
95+
In order to know the requirements and setting up the project and database locally, visit [Development Workflow wiki](https://github.com/kshitij10496/hercules/wiki/Development-Workflow)

0 commit comments

Comments
 (0)