- Clone this repo and go to the cloned directory:
$ git clone https://github.com/web-izmerenie/avto-lux161 avto-lux161
$ cd avto-lux161
- Install git-submodules:
$ git submodule update --init
- Create Python virtual environment and activate it:
$ pyvenv .venv
$ source ./.venv/bin/activate
- Install Python requirements:
$ pip3 install -r requirements.txt
-
Copy config.yaml.example to
config.yaml
and set inconfig.yaml
: -
DATABASE
— set correct access data to database; -
DEV_SERVER
— if you going to start development server; -
PRODUCTION_SERVER
— if you going to start production server.
WARNING!: don't set instances more than 1, cause it isn't supported yet, need some debug for errors; -
DEBUG
— set to 1 if you wan't more debug info. -
Copy
./files/uploaded/
dir from backup archive to./files/uploaded/
.
Just for example:
$ cd files
$ tar -xzf ../avtolux_files_backup_20150308050634.tar.gz --strip-components=1 files/uploaded/
- Fill database by database dump from backup archive:
$ cat avtolux_db_dump_20150308041213.sql.gz | gunzip | psql --host localhost -U avtolux_user avtolux_dbname
Where avtolux_db_dump_20150308041213.sql.gz
is database dump,
avtolux_user
is user for database access
and avtolux_dbname
is a database name;
- Install npm dependencies and build some front-end stuff:
$ npm install
It automatically runs ./deploy.sh
after install
and installs some bower dependencies
and build front-end by ./front-end-gulp
tool;
- Run debug server:
$ ./run_development.sh
Or production:
$ ./run_production.sh