README.md 1.61 KB
Newer Older
1 2 3 4 5 6 7
# With my ISP
The goal is to create a photo album to show all the cool things you can do
in a DIY ISP.

# How it works
Each album is differentiated by the hostname

CapsLock's avatar
CapsLock committed
8 9 10
# License
This software is under [GNU AGPL 3.0](http://www.gnu.org/licenses/agpl-3.0.html)

11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
# Installation
## Ansible

    ansible-playbook ansible.yml --ask-pass --ask-sudo-pass

## Postgresql grants

    # su postgres
    $ psql template1
    # \c avecmonfai
    # grant all on pictures to avecmonfai;
    # grant all on domain_names to avecmonfai;
    # grant all on pictures_domain_names to avecmonfai;
    # grant all on pictures_id_seq to avecmonfai;
    # grant all on domain_names_id_seq to avecmonfai;
    # grant all on pictures_id_seq to avecmonfai;
    # grant all on pictures_domain_names_id_seq to avecmonfai;

## settings

    # cd /home/avecmonfai/avecmonfai
    # cp settings.yml.example setings.yml

## supervisor:
    # vi /etc/supervisor/conf.d/avecmonfai.conf

        [program:avecmonfai]
        directory = /home/avecmonfai/avecmonfai
        user = avecmonfai
        command = /home/avecmonfai/avecmonfai/venv/bin/python /home/avecmonfai/avecmonfai/start.py --user=avecmonfai --group=avecmonfai --log-level=debug --log-file=/home/avecmonfai/logs/avecmonfai.log
        stdout_logfile = /home/avecmonfai/logs/avecmonfai-std.log
        stderr_logfile = /home/avecmonfai/logs/avecmonfai-err.log
    # supervisorctl reload
    # supervisorctl start avecmonfai

## Web server
you may put this behind a reverse proxy which match on your domain.com and *.domain.com

## DNS
you have to configure the zone of your domain.com to resolve *.domain.com to your web server