Skip to content

Commit eb75b8e

Browse files
committed
Update developer instructions.
1 parent 2c56207 commit eb75b8e

File tree

1 file changed

+24
-6
lines changed

1 file changed

+24
-6
lines changed

README.md

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
Membership management for hacklabs. uses Python 3.4.
44

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.
66

77
## TL;DR
88

99
Install docker and run the `docker/dev.sh` to set up a development enviroment. The script
1010
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.
1212

1313
## REST API
1414

@@ -30,7 +30,21 @@ Admins can issue auth tokens to users via https://yourserver.example.com/admin/a
3030
[filterbacked]: http://www.django-rest-framework.org/api-guide/filtering/#djangofilterbackend
3131
[djangoqs]: https://docs.djangoproject.com/en/1.8/ref/models/querysets/#field-lookups
3232

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
3448

3549
### General
3650

@@ -135,23 +149,27 @@ server {
135149
}
136150
}</code></pre>
137151

138-
### Updating upstream changes
152+
## Updating upstream changes
139153

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)
141156

142157
git checkout master
143158
git fetch upstream
144159
git rebase upstream/master master
145160
git checkout myhackerspace
146161
git merge master
162+
163+
And in the production server (or inside your Docker dev container):
164+
147165
source venv/bin/activate
148166
pip install -r requirements/production.txt
149167
./manage.py migrate
150168
npm run build
151169
./manage.py collectstatic --noinput
152170
find . -name '._*' | xargs rm ; for app in $( find . -path '*/locale' | grep -v venv/ ); do (cd $(dirname $app) && ../manage.py compilemessages ); done
153171

154-
And assuming you have uWSGI configured `touch reload`
172+
And if you have uWSGI configured `touch reload`, Docker dev env reloads automatically.
155173

156174
## Cron jobs
157175

0 commit comments

Comments
 (0)