README.md 2.85 KB
Newer Older
Konrad Mohrfeldt's avatar
Konrad Mohrfeldt committed
1
# Stadtgestalten
Robert's avatar
Robert committed
2

Konrad Mohrfeldt's avatar
Konrad Mohrfeldt committed
3
Stadtgestalten is a platform destined to encourage and enable social action and solidarity in the context of your city. Bildet Banden!
4

Konrad Mohrfeldt's avatar
Konrad Mohrfeldt committed
5
## Quick Setup
6

7
### For administrators
Lars Kruse's avatar
Lars Kruse committed
8
You may want to install the latest [snapshot build](https://git.hack-hro.de/stadtgestalten/stadtgestalten/builds/artifacts/master/raw/build/debian/export/stadtgestalten.deb?job=deb-package) as a deb package. Please note that this is a rather dirty package (only amd64, containing a virtualenv with python3.5 - suitable for Debian stretch).
9 10

### For developers
Konrad Mohrfeldt's avatar
Konrad Mohrfeldt committed
11 12 13
1. You will need [yarn](https://yarnpkg.com/lang/en/), [virtualenv](https://virtualenv.pypa.io/en/stable/), [node](https://nodejs.org/en/), [python3](https://www.python.org/), [flake8](http://flake8.pycqa.org/en/latest/), [pip](https://pip.pypa.io/en/stable/) and [make](https://www.gnu.org/software/make/) to get started. If you have all of those, you may proceed :). Otherwise see the Dependencies Section
2. Run `make app_setup` and wait until you see something like `Starting development server at http://127.0.0.1:8000/`
3. Visit http://127.0.0.1:8000/
14

Konrad Mohrfeldt's avatar
Konrad Mohrfeldt committed
15
## Dependencies
16

Konrad Mohrfeldt's avatar
Konrad Mohrfeldt committed
17
Depending on your distribution (we assume you’ll be using something like Linux here) the build dependencies of this project will be available via your package manager.
18

Konrad Mohrfeldt's avatar
Konrad Mohrfeldt committed
19 20 21 22 23 24 25
### Debian
For `virtualenv`, `python3`, `flake8` and `pip` use apt:
```sh
apt install make virtualenv python3 python3-flake8 python3-pip
```
`node` is available as `nodejs` and `nodejs-legacy` (please install both), but you’ll have to have Debian Stretch to get a node version that is going to work. The nodejs people also offer pre-packaged up to date builds [here](https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions).
`yarn` is not yet available in Debian. Take a look at their [installation manual](https://yarnpkg.com/en/docs/install).
26

Konrad Mohrfeldt's avatar
Konrad Mohrfeldt committed
27 28 29 30 31
### Arch Linux
Fortunately all of the required packages are available via pacman.
```sh
pacman -Sy make nodejs yarn flake8 python python-virtualenv python-pip 
```
32 33


Konrad Mohrfeldt's avatar
Konrad Mohrfeldt committed
34
## Local Settings
35

Konrad Mohrfeldt's avatar
Konrad Mohrfeldt committed
36 37 38 39
Your local Django settings will be located in `stadt/settings/local.py`. Use `make app_local_settings` to create a default configuration. 


## Database Setup
40 41 42 43

The preconfigured database is a local sqlite file.
For production deployment you should use a database server.

Konrad Mohrfeldt's avatar
Konrad Mohrfeldt committed
44
### PostgreSQL
45 46 47 48 49 50

The following statement creates a suitable database including proper collation settings:

    CREATE USER stadtgestalten with password 'PUT RANDOM NOISE';
    CREATE DATABASE stadtgestalten WITH ENCODING 'UTF8' LC_COLLATE='de_DE.UTF8' LC_CTYPE='de_DE.UTF8' TEMPLATE=template0 OWNER stadtgestalten;

Konrad Mohrfeldt's avatar
Konrad Mohrfeldt committed
51 52 53 54 55 56 57 58 59 60
The command above requires the locale 'de_DE.UTF8' in the system of the database server.


## Production deployment

We recommend to use the provided debian package. It already comes with a UWSGI config.

## Contributing

See [CONTRIBUTING.md](./CONTRIBUTING.md)