Merge branch 'develop' into 'master'
1st Live deploy See merge request sahkoinsinoorikilta/vtmk/web2.0-backend!37
This commit is contained in:
@@ -56,7 +56,8 @@ app.filter('unsafe', function($sce) {
|
|||||||
app.controller('ABBController', function($scope, $http){
|
app.controller('ABBController', function($scope, $http){
|
||||||
$scope.jobs = [];
|
$scope.jobs = [];
|
||||||
var min_date = moment().subtract(30,'days').format("YYYY-MM-DD%20HH:mm:ss");
|
var min_date = moment().subtract(30,'days').format("YYYY-MM-DD%20HH:mm:ss");
|
||||||
var url = "https://sahkoinsinoorikilta.fi/api/news.php";
|
// TODO: FIX, we try to get rid of php, not depend on it!
|
||||||
|
var url = "https://old.sahkoinsinoorikilta.fi/api/news.php";
|
||||||
var params = "?type=11&lang=fi&title_search=ABB&min_date="+min_date
|
var params = "?type=11&lang=fi&title_search=ABB&min_date="+min_date
|
||||||
$http.get(url+params).then(function(response){
|
$http.get(url+params).then(function(response){
|
||||||
$scope.jobs = _.filter(response.data, function(job){
|
$scope.jobs = _.filter(response.data, function(job){
|
||||||
|
|||||||
+8
-8
@@ -187,14 +187,14 @@ REST_FRAMEWORK = {
|
|||||||
'DEFAULT_AUTHENTICATION_CLASSES': (
|
'DEFAULT_AUTHENTICATION_CLASSES': (
|
||||||
'rest_framework_jwt.authentication.JSONWebTokenAuthentication',
|
'rest_framework_jwt.authentication.JSONWebTokenAuthentication',
|
||||||
),
|
),
|
||||||
'DEFAULT_THROTTLE_CLASSES': (
|
# 'DEFAULT_THROTTLE_CLASSES': (
|
||||||
'members.throttles.BurstRateThrottle',
|
# 'members.throttles.BurstRateThrottle',
|
||||||
'members.throttles.SustainedRateThrottle'
|
# 'members.throttles.SustainedRateThrottle'
|
||||||
),
|
# ),
|
||||||
'DEFAULT_THROTTLE_RATES': {
|
# 'DEFAULT_THROTTLE_RATES': {
|
||||||
'burst': '60/min',
|
# 'burst': '60/min',
|
||||||
'sustained': '1000/day'
|
# 'sustained': '1000/day'
|
||||||
},
|
# },
|
||||||
'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.LimitOffsetPagination',
|
'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.LimitOffsetPagination',
|
||||||
'PAGE_SIZE': 1000,
|
'PAGE_SIZE': 1000,
|
||||||
'DEFAULT_FILTER_BACKENDS': (
|
'DEFAULT_FILTER_BACKENDS': (
|
||||||
|
|||||||
+1
-1
@@ -17,7 +17,7 @@ from sikweb.base import *
|
|||||||
DEBUG = os.getenv('DEBUG', False) == 'True'
|
DEBUG = os.getenv('DEBUG', False) == 'True'
|
||||||
|
|
||||||
URL = os.getenv("HOST", "api.sahkoinsinoorikilta.fi")
|
URL = os.getenv("HOST", "api.sahkoinsinoorikilta.fi")
|
||||||
FRONTEND_URL = os.getenv("FRONTEND_URL", "prod.sahkoinsinoorikilta.fi")
|
FRONTEND_URL = os.getenv("FRONTEND_URL", "sahkoinsinoorikilta.fi")
|
||||||
ALLOWED_HOSTS = ["localhost", "127.0.0.1", FRONTEND_URL, URL]
|
ALLOWED_HOSTS = ["localhost", "127.0.0.1", FRONTEND_URL, URL]
|
||||||
if DEBUG:
|
if DEBUG:
|
||||||
ALLOWED_HOSTS = ["*"]
|
ALLOWED_HOSTS = ["*"]
|
||||||
|
|||||||
@@ -4,8 +4,6 @@ services:
|
|||||||
image: postgres:12
|
image: postgres:12
|
||||||
deploy:
|
deploy:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
restart_policy:
|
|
||||||
condition: on-failure
|
|
||||||
environment:
|
environment:
|
||||||
- POSTGRES_PASSWORD=postgres
|
- POSTGRES_PASSWORD=postgres
|
||||||
ports:
|
ports:
|
||||||
@@ -17,8 +15,6 @@ services:
|
|||||||
image: registry.gitlab.com/sahkoinsinoorikilta/vtmk/web2.0-backend:latest
|
image: registry.gitlab.com/sahkoinsinoorikilta/vtmk/web2.0-backend:latest
|
||||||
deploy:
|
deploy:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
restart_policy:
|
|
||||||
condition: on-failure
|
|
||||||
update_config:
|
update_config:
|
||||||
order: start-first
|
order: start-first
|
||||||
depends_on:
|
depends_on:
|
||||||
|
|||||||
+1
-5
@@ -4,8 +4,6 @@ services:
|
|||||||
image: postgres:12
|
image: postgres:12
|
||||||
deploy:
|
deploy:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
restart_policy:
|
|
||||||
condition: on-failure
|
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
- POSTGRES_USER_FILE=/run/secrets/BACKEND_DB_USER
|
- POSTGRES_USER_FILE=/run/secrets/BACKEND_DB_USER
|
||||||
@@ -22,8 +20,6 @@ services:
|
|||||||
image: registry.gitlab.com/sahkoinsinoorikilta/vtmk/web2.0-backend:latest
|
image: registry.gitlab.com/sahkoinsinoorikilta/vtmk/web2.0-backend:latest
|
||||||
deploy:
|
deploy:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
restart_policy:
|
|
||||||
condition: on-failure
|
|
||||||
update_config:
|
update_config:
|
||||||
order: start-first
|
order: start-first
|
||||||
depends_on:
|
depends_on:
|
||||||
@@ -47,7 +43,7 @@ services:
|
|||||||
- DB_USER_FILE=/run/secrets/BACKEND_DB_USER
|
- DB_USER_FILE=/run/secrets/BACKEND_DB_USER
|
||||||
- DB_PASSWD_FILE=/run/secrets/BACKEND_DB_PASSWD
|
- DB_PASSWD_FILE=/run/secrets/BACKEND_DB_PASSWD
|
||||||
- HOST=api.sahkoinsinoorikilta.fi
|
- HOST=api.sahkoinsinoorikilta.fi
|
||||||
- FRONTEND_URL=prod.sahkoinsinoorikilta.fi
|
- FRONTEND_URL=sahkoinsinoorikilta.fi
|
||||||
- DB_HOST=db
|
- DB_HOST=db
|
||||||
- DB_PORT=5432
|
- DB_PORT=5432
|
||||||
- EMAIL_API_KEY_FILE=/run/secrets/BACKEND_EMAIL_API_KEY
|
- EMAIL_API_KEY_FILE=/run/secrets/BACKEND_EMAIL_API_KEY
|
||||||
|
|||||||
Reference in New Issue
Block a user