syncing master

This commit is contained in:
Senad Uka
2017-11-21 17:11:29 +01:00
parent 0eee92660a
commit b4e45199b7
47 changed files with 5666 additions and 263 deletions

View File

@@ -5,7 +5,80 @@
- [Production](https://helix-calculator.sunpower.com/)
### Setup
## Local Development and Testing with Docker
##### Dependencies
- Docker: [docs.docker.com/engine/installation](https://docs.docker.com/engine/installation/)
- CircleCi CLI: [Installing and using CircleCi locally](https://circleci.com/docs/2.0/local-jobs/#installing-the-cli-locally)
- Current CircleCi and development image:
[ivannnn/heroku-cedar14-extras:2.0](https://hub.docker.com/r/ivannnn/heroku-cedar14-extras/)
| ivannnn/heroku-cedar14-extras:2.0 |
| ------------- |
| ruby 2.3.5p376 |
| Python 3.5.4 |
| postgresql-9.5 |
| postgresql-client-9.5|
| postgresql-client-9.6 |
| postgresql-client-common |
| postgresql-common |
| postgresql-contrib-9.5 |
| postgresql-server-dev-9.6 |
| redis-server/trusty,now 2:2.8.4-2 amd64 |
| redis-tools/trusty,now 2:2.8.4-2 amd64 |
| google-chrome-stable/stable,now 62.0.3202.94-1 amd64 |
| nodejs/unknown,now 6.12.0-1nodesource1 amd64 |
##### Test locally with CircleCi
- Go to the project dir
- ```circleci build```
##### Develop
- Run the docker container for the 1st time
```docker run -d --name helix -p 5000:5000 --expose 5000 -t ivannnn/heroku-cedar14-extras:2.0```
- Or re start the docker conatiner
```docker container start helix```
- Copy the code to the container
```docker cp . helix:project```
- Log in the docker container
```docker exec -t -i helix /bin/bash```
- Run this commands inside the docker conatiner
```
cd project && \
rm -rf env && \
gem install bundler && \
service postgresql start &&\
service redis-server start &&\
export PGPASSWORD=password &&\
export CIRCLE_TEST_REPORTS=$(pwd) &&\
python3.5 -m venv env &&\
source env/bin/activate &&\
pip install invoke &&\
invoke install &&\
npm install &&\
invoke db_migrate
```
##### Important
- Open another terminal tab, this script watches for changes and pass them
to the docker conatiner, which will restart the web server
```./watch.sh```
## OS steps wihout Docker
#### macOS systems