2
2
3
3
Membership management for hacklabs. uses Python 3.4.
4
4
5
- Uses django-environ for configurations, create ` .env ` -file in your project dir to override settings.
5
+ Uses django-environ for configurations, you can create ` .env ` -file in your project dir to override settings.
6
6
7
7
## TL;DR
8
8
9
9
Install docker and run the ` docker/dev.sh ` to set up a development enviroment. The script
10
10
will mount the project directory inside the docker container so that all modifications in
11
- the ` project/ ` take effect immediately.
11
+ the ` project/ ` take effect immediately. Do not create ` .env ` file yet.
12
12
13
13
## REST API
14
14
@@ -30,7 +30,21 @@ Admins can issue auth tokens to users via https://yourserver.example.com/admin/a
30
30
[ filterbacked ] : http://www.django-rest-framework.org/api-guide/filtering/#djangofilterbackend
31
31
[ djangoqs ] : https://docs.djangoproject.com/en/1.8/ref/models/querysets/#field-lookups
32
32
33
- ## Install/setup
33
+ ## Developer setup
34
+
35
+ Fork the repo on github and use you local fork as checkout source.
36
+
37
+ - Make sure you have [ Docker] ( https://www.docker.com/get-docker )
38
+ - Clone your fork to local machine
39
+ - ` git remote add upstream https://github.com/hacklab-fi/asylum.git `
40
+ - ` docker/dev.sh `
41
+
42
+ That script will build docker image and map your checkout directory there so you can
43
+ edit the files directly in your checkout.
44
+
45
+ See also "Updating upstream changes".
46
+
47
+ ## Install/setup in native
34
48
35
49
### General
36
50
@@ -135,23 +149,27 @@ server {
135
149
}
136
150
}</code ></pre >
137
151
138
- ### Updating upstream changes
152
+ ## Updating upstream changes
139
153
140
- In the ` project ` dir of your checkout
154
+ In the ` project ` dir of your checkout (` myhackerspace ` being the branch you want to
155
+ update upstream changes to)
141
156
142
157
git checkout master
143
158
git fetch upstream
144
159
git rebase upstream/master master
145
160
git checkout myhackerspace
146
161
git merge master
162
+
163
+ And in the production server (or inside your Docker dev container):
164
+
147
165
source venv/bin/activate
148
166
pip install -r requirements/production.txt
149
167
./manage.py migrate
150
168
npm run build
151
169
./manage.py collectstatic --noinput
152
170
find . -name '._*' | xargs rm ; for app in $( find . -path '*/locale' | grep -v venv/ ); do (cd $(dirname $app) && ../manage.py compilemessages ); done
153
171
154
- And assuming you have uWSGI configured ` touch reload `
172
+ And if you have uWSGI configured ` touch reload ` , Docker dev env reloads automatically.
155
173
156
174
## Cron jobs
157
175
0 commit comments