Skip to content
This repository has been archived by the owner on Oct 16, 2024. It is now read-only.

Commit

Permalink
Merge pull request #86 from Fotogjengen/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
sjsivert authored Apr 7, 2019
2 parents f464855 + 53b4843 commit 06ef6a4
Show file tree
Hide file tree
Showing 316 changed files with 935 additions and 504 deletions.
Empty file modified .editorconfig
100644 → 100755
Empty file.
3 changes: 3 additions & 0 deletions .gitignore
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
.idea
*.swp
*.zip
.vscode
temp
*.log
.DS_Store
webhook/hooks.json
local_settings.py
88 changes: 48 additions & 40 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,52 +1,60 @@
sudo: required
language: node_js
node_js:
- "8"
- '8'
services:
- docker
- docker
cache:
directories:
- src/angular_frontend/node_modules
- src/angular_frontend/node_modules
addons:
ssh_known_hosts:
- 146.185.181.250
- [email protected]

- 146.185.181.250
- [email protected]
jobs:
include:
- stage: test django
env:
- DOCKER_COMPOSE_VERSION=1.18.0
install:
- docker -v
- sudo rm /usr/local/bin/docker-compose
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname
-s`-`uname -m` > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin
- docker-compose -f docker-compose.yml -f docker-compose.override.yml -f docker-compose.travis.yml
down
- docker-compose -f docker-compose.yml -f docker-compose.override.yml -f docker-compose.travis.yml
build
- docker-compose -f docker-compose.yml -f docker-compose.override.yml -f docker-compose.travis.yml
up -d
- docker-compose -f docker-compose.yml -f docker-compose.override.yml -f docker-compose.travis.yml
ps
script:
- sleep 5
- bash django-tests.sh
- stage: test angular
install:
- npm install -g @angular/[email protected]
- cd src/angular_frontend && npm install
script:
- ng lint
- ng build --prod
# - rsync -r dist/* [email protected]:./fg/src/angular_frontend/dist

- stage: test
env:
- DOCKER_COMPOSE_VERSION=1.18.0
install:
- docker -v
- sudo rm /usr/local/bin/docker-compose
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname
-s`-`uname -m` > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin
- docker-compose -f docker-compose.yml -f docker-compose.override.yml -f docker-compose.travis.yml
down
- docker-compose -f docker-compose.yml -f docker-compose.override.yml -f docker-compose.travis.yml
build
- docker-compose -f docker-compose.yml -f docker-compose.override.yml -f docker-compose.travis.yml
up -d
- docker-compose -f docker-compose.yml -f docker-compose.override.yml -f docker-compose.travis.yml
ps
- npm install -g @angular/[email protected]
- cd src/angular_frontend && npm install
- ng build --prod
- zip -r app.zip dist/
- cd ../..
script:
- sleep 5
- bash django-tests.sh
before_deploy:
- git config --local user.name "pernilak"
- git config --local user.email "[email protected]"
- export TRAVIS_TAG=${TRAVIS_TAG:-$(date +'%Y%m%d%H%M%S')-$(git log --format=%h -1)}
- git tag $TRAVIS_TAG
deploy:
provider: releases
skip_cleanup: true
api_key:
secure: WdqLe1PMUiDME6LTqk49R7spAQQPlrJI1Ic4eSn/EcEe8/Qn6I11WWWG84oyarxqmhWhPyYkTYV+HzP4pApw/MRNC47mitcjihijoSkvM22kVp3UQI6TS6reO0CI7VxGJGGHTO2ItJplvHqiqLUNf7sYX05X270c/bxmHDL/3pIF8iRIPyBxbky5ABVdVp54nUOsY/6n6FqLfdI73uHV1IdVhOEPWPb1Jo/wycmQG1917oiysmHBQWAH9x6wbAlpYNBdmhA4RUcxs2u+WRV8E9VaxOMM5W04sTCVJ5MiRGEb39DQtF64sOcu8sFCY5CkBNxXCwERsrtb2SNaq6GgtqCe+x/RjRQfTAR9eg4pHyFG3lnY7FTmdbkPZ0x1gWBTPZvr2G9rYGjY8fnavLP9pP+WmVjX77n2djr0oYHEyX/K83lLSryKT10E3QPfsPL/l3eu83mXd+DEJa6m8YN0qi7bARNVGxjvM1J/CJoTfTGRk/4C+iTrrjSc9ExCNhBpRSgk5e8TNOJJl/bW1+VZR8ihVEZS+DepFcCoAu+I93Kga2STSF/Y/+AgT/F0PY6wIR7IjIkg5o0+j3xXWtX76bcYkPI/7N5YmJ4jqM8HvTF6x8xMFKFbDc4m4PKXkzhnpsfjxEAmsTEsSc8D+sqDzRMl9e2bg6opt+o9zXyL3xk=
file: src/angular_frontend/app.zip
on:
repo: Fotogjengen/fg
branch: master
notifications:
slack:
rooms:
- secure: "CTQ8MVYEolu/J1jlpNYyaF4HkoFTr6JfCPk0BEMfANcE79CybG/5GAvvusVuD9s1dbFsat9TAH9Ra5fWLevQFr8qvM6oDbMqACFYVj6lEAXzdg/6jUdwb7oA4bdbS5V4zw3d7BS33hH9Uspi0r/SV4ee3CwAWcgsfeFfuViaRj7QKXJwk4XMFltO6yMK6aSK1wO/l3Mt6iu2e1gSgmQsgk6GGrwGiNu4yEHjoCArytOVQo+PvYwAqjnXcEEWEqm0YPM74E9xy8vsXcx2N+c9UhEatDFUD288yNezHtXhITz2lZooJ7SxzGDN7tC4Zg3rGGrqBfXYTH6KSr/zC4V9QpPLtAr7Sifq15hWiRamLcAPIiSVI6H1HtLeA9oPjM+HjiwDfpod1OUgnonHp6IHATPpcnGIslkav9FzhJaLPSAnbd+A6TUaLVD5cy4263mNbYI3TMrmjkxesnEeL8NUjVyo2Pq67fdtkt6H+Bc4fIfbWXKnraa1eoxWUBqjWf06016f7uGxXI3/YXcjW9rcTAzvIPjo9i9Pc8xPZD3nN1IfIThscA07rlXq/knDJmpzmdINkpAhMcMkMd+O+VjD0KbkG2dlm84CbMOfI7ZGjxCa+3q4NCSjrHx06vJoJkNyx5SPFvFjR5JmBwGqupmJ+d4dQVl4DiS/Yj+RvFZcdDA="
on_failure: always
on_success: always
secure: YlcczsJzqvtxcLnrELRX1RLbMjKkxYrhf4y7yBPqwzXaWzzmUML8K1RWqCA94tD66IRCK5GOZoE4qZb7RMDt7o1fN9Qn19wbbEbJkGmookFF8eindslBxyxKW9195Mxk0ZGpEuItfwoE3Le3KPg/kXAODoQPnYoHMi89tCOnzqzryKhmyhq+6qJ8tnIIEuNoQ3kHwoudWmRHAVB3CC9vJW3RRrTSCtis+t9lcgqmt2mouAFCXEwjFxzD+KwUOPqqdjMeZZh4V8g7Z4piS5WpyLqvNmJrKelURxI3sW/CBUFp0WLpjvdOsaYsIYntlsqbCAe/NoTFO0MDK4lMfJRv/XB66+Ou8WltJQC6ygj4ulrDeJTBAxMmy28zojvoZp7BBKpYjQNiZ3G9rL6FkOuJhM+C9jbzrony+DDNcOJvkJogs4X6rJyPO2ekNWQWoEagwOkCn0LGO1b7LkEi15DgeHPae9nKtldCi0jsWdcb3Y6yP7Ot0HTyT5z4mPb8jEThHHjuMnFVeaobwLiNcamK00Y0AuQXgolvEWOyIfjGP1qPKI7W9oJrtQ/EyumGvINGLs4OMjAVX4uCxmg+9iOvDXkP5h2AmKc0sjbND7uznvktVKay88oOiFUW/XXXEOYkUw6HfxNzVkZKlqzf+6HxamIi5QgZdS5UqXZvmSmeLv8=


2 changes: 1 addition & 1 deletion README.md
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Setup for Windows users

1. See steps 1, 2, 3 and 4 below
2. Run ´docker-compose up -d --build` (´-d´ is for detached mode, sometimes you want to see logs and can remove this)
2. Run `docker-compose up -d --build` (`-d` is for detached mode, sometimes you want to see logs and can remove this)
3. To seed the dev database with fake data run:
```
docker exec -u=postgres postgres sh /scripts/drop_and_recreate_database.sh
Expand Down
Empty file modified deploy_script.sh
100644 → 100755
Empty file.
Empty file modified development.sh
100644 → 100755
Empty file.
Empty file modified django-tests.sh
100644 → 100755
Empty file.
2 changes: 2 additions & 0 deletions docker-compose.override.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ services:
environment:
- DEVELOPMENT=true
- POSTGRES_DB=fg_dev_db
- LD_LIBRARY_PATH=/usr/local/lib
- [email protected]
volumes:
- ./src/angular_frontend:/static/angular

Expand Down
Empty file modified docker-compose.travis.yml
100644 → 100755
Empty file.
Empty file modified docker-compose.yml
100644 → 100755
Empty file.
Empty file modified docs/new_arch_diagram.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified droprecreatedb.sh
100644 → 100755
Empty file.
Empty file modified insert_old_db.sh
100644 → 100755
Empty file.
17 changes: 0 additions & 17 deletions nginx/Dockerfile
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,21 +1,4 @@
# Stage 1
FROM node:9-alpine as build-deps
RUN npm i @angular/[email protected] [email protected] -g --unsafe-perm

WORKDIR /src

# Copy files defining dependency first
COPY src/angular_frontend/package.json .
COPY src/angular_frontend/package-lock.json .
RUN npm i && npm rebuild node-sass

# Then copy over the rest of directory and build
COPY src/angular_frontend/ .
RUN ng build

# Stage 2
FROM nginx:1.15.0

COPY nginx/nginx.conf /etc/nginx/nginx.conf
COPY nginx/default.conf /etc/nginx/conf.d/default.conf
COPY --from=build-deps /src/dist /static/angular/dist
1 change: 1 addition & 0 deletions nginx/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ server {
uwsgi_param X-Real-IP $remote_addr;
uwsgi_param X-Forwarded-For $proxy_add_x_forwarded_for;
uwsgi_param X-Forwarded-Proto $http_x_forwarded_proto;
uwsgi_param HTTP_REMOTE_USER sjsivert@;
}

# hidden folders should never be accessible (.git, .vscode etc.)
Expand Down
Empty file modified postgres/.gitignore
100644 → 100755
Empty file.
Empty file modified postgres/scripts/drop_and_recreate_database.sh
100644 → 100755
Empty file.
1 change: 1 addition & 0 deletions postgres/scripts/restore_old_db_from_dump.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env bash
dropdb --if-exists 'old_fg'
createdb -U postgres -T template0 old_fg
psql -U postgres -d old_fg -f /data/dump.sql
Empty file modified remove-containers-volumes.sh
100644 → 100755
Empty file.
File renamed without changes.
Empty file modified src/angular_frontend/.angulardoc.json
100644 → 100755
Empty file.
Empty file modified src/angular_frontend/.dockerignore
100644 → 100755
Empty file.
Empty file modified src/angular_frontend/.editorconfig
100644 → 100755
Empty file.
Empty file modified src/angular_frontend/.gitignore
100644 → 100755
Empty file.
Empty file modified src/angular_frontend/README.md
100644 → 100755
Empty file.
Empty file modified src/angular_frontend/angular.json
100644 → 100755
Empty file.
Empty file modified src/angular_frontend/e2e/app.e2e-spec.ts
100644 → 100755
Empty file.
Empty file modified src/angular_frontend/e2e/app.po.ts
100644 → 100755
Empty file.
Empty file modified src/angular_frontend/e2e/tsconfig.e2e.json
100644 → 100755
Empty file.
Empty file modified src/angular_frontend/karma.conf.js
100644 → 100755
Empty file.
Loading

0 comments on commit 06ef6a4

Please sign in to comment.