README 1.8 KB
Newer Older
Ángel Velásquez's avatar
Ángel Velásquez committed
1
2
3
4
5
6
# Archweb README

To get a pretty version of this document, run

    $ markdown README > README.html

eliott's avatar
eliott committed
7
# License
Ángel Velásquez's avatar
Ángel Velásquez committed
8
9

See LICENSE file.
eliott's avatar
eliott committed
10
11

# Authors
Ángel Velásquez's avatar
Ángel Velásquez committed
12
13

See AUTHORS file.
eliott's avatar
eliott committed
14

eliott's avatar
eliott committed
15
# Dependencies
eliott's avatar
eliott committed
16

17
18
- python2
- python2-virtualenv
Ángel Velásquez's avatar
Ángel Velásquez committed
19
20
21
22

# Python dependencies

More detail in `requirements.txt` and `requirements_prod.txt`; it is best to
Dan McGee's avatar
Dan McGee committed
23
24
use virtualenv and pip to handle these. But if you insist on (Arch Linux)
packages, you will probably want the following:
Ángel Velásquez's avatar
Ángel Velásquez committed
25
26

- django
27
28
- python2-psycopg2
- python2-markdown
Dan McGee's avatar
Dan McGee committed
29
30
- python2-south
- python2-memcached
Ángel Velásquez's avatar
Ángel Velásquez committed
31
32
33

# Testing Installation

34
1. Run `virtualenv2`.
Ángel Velásquez's avatar
Ángel Velásquez committed
35

Dan McGee's avatar
Dan McGee committed
36
        $ cd /path/to/archweb && virtualenv2 ./env/
Dan McGee's avatar
Dan McGee committed
37

38
2. Activate the virtualenv.
Dan McGee's avatar
Dan McGee committed
39

Dan McGee's avatar
Dan McGee committed
40
        $ source ./env/bin/activate
eliott's avatar
eliott committed
41

Ángel Velásquez's avatar
Ángel Velásquez committed
42
2. Install dependencies through `pip`.
eliott's avatar
eliott committed
43

Dan McGee's avatar
Dan McGee committed
44
        (archweb-env) $ pip install -r requirements.txt
eliott's avatar
eliott committed
45

Ángel Velásquez's avatar
Ángel Velásquez committed
46
3. Copy `local_settings.py.example` to `local_settings.py` and modify.
47
48
   Make sure to uncomment the appropriate database section (either sqlite or
   PostgreSQL).
Ángel Velásquez's avatar
Ángel Velásquez committed
49
50
51

4. Sync the database to create it.

Dan McGee's avatar
Dan McGee committed
52
        (archweb-env) $ ./manage.py syncdb
Ángel Velásquez's avatar
Ángel Velásquez committed
53
54
55

5. Migrate changes.

Dan McGee's avatar
Dan McGee committed
56
        (archweb-env) $ ./manage.py migrate
Ángel Velásquez's avatar
Ángel Velásquez committed
57

58
59
6. Load the fixtures to prepopulate some data. If you don't want some of the
   provided data, adjust the file glob accordingly.
Ángel Velásquez's avatar
Ángel Velásquez committed
60

61
        (archweb-env) $ ./manage.py loaddata */fixtures/*.json
62

Ángel Velásquez's avatar
Ángel Velásquez committed
63
64
7. Use the following commands to start a service instance

Dan McGee's avatar
Dan McGee committed
65
        (archweb-env) $ ./manage.py runserver
Ángel Velásquez's avatar
Ángel Velásquez committed
66
67
68

8. To optionally populate the database with real data:

Dan McGee's avatar
Dan McGee committed
69
70
        (archweb-env) $ wget ftp://ftp.archlinux.org/core/os/i686/core.db.tar.gz
        (archweb-env) $ ./manage.py reporead i686 core.db.tar.gz
71
        (archweb-env) $ ./manage.py syncisos
Ángel Velásquez's avatar
Ángel Velásquez committed
72

73
74
Alter architecture and repo to get x86\_64 and packages from other repos if
needed.
eliott's avatar
eliott committed
75

Ángel Velásquez's avatar
Ángel Velásquez committed
76
# Production Installation
Dusty Phillips's avatar
Dusty Phillips committed
77

Ángel Velásquez's avatar
Ángel Velásquez committed
78
Ask someone who knows, or you are going to be in trouble.
Dusty Phillips's avatar
Dusty Phillips committed
79

Ángel Velásquez's avatar
Ángel Velásquez committed
80
vim: set syntax=markdown et: