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){
|
||||
$scope.jobs = [];
|
||||
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
|
||||
$http.get(url+params).then(function(response){
|
||||
$scope.jobs = _.filter(response.data, function(job){
|
||||
|
||||
+8
-8
@@ -187,14 +187,14 @@ REST_FRAMEWORK = {
|
||||
'DEFAULT_AUTHENTICATION_CLASSES': (
|
||||
'rest_framework_jwt.authentication.JSONWebTokenAuthentication',
|
||||
),
|
||||
'DEFAULT_THROTTLE_CLASSES': (
|
||||
'members.throttles.BurstRateThrottle',
|
||||
'members.throttles.SustainedRateThrottle'
|
||||
),
|
||||
'DEFAULT_THROTTLE_RATES': {
|
||||
'burst': '60/min',
|
||||
'sustained': '1000/day'
|
||||
},
|
||||
# 'DEFAULT_THROTTLE_CLASSES': (
|
||||
# 'members.throttles.BurstRateThrottle',
|
||||
# 'members.throttles.SustainedRateThrottle'
|
||||
# ),
|
||||
# 'DEFAULT_THROTTLE_RATES': {
|
||||
# 'burst': '60/min',
|
||||
# 'sustained': '1000/day'
|
||||
# },
|
||||
'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.LimitOffsetPagination',
|
||||
'PAGE_SIZE': 1000,
|
||||
'DEFAULT_FILTER_BACKENDS': (
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ from sikweb.base import *
|
||||
DEBUG = os.getenv('DEBUG', False) == 'True'
|
||||
|
||||
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]
|
||||
if DEBUG:
|
||||
ALLOWED_HOSTS = ["*"]
|
||||
|
||||
@@ -4,8 +4,6 @@ services:
|
||||
image: postgres:12
|
||||
deploy:
|
||||
replicas: 1
|
||||
restart_policy:
|
||||
condition: on-failure
|
||||
environment:
|
||||
- POSTGRES_PASSWORD=postgres
|
||||
ports:
|
||||
@@ -17,8 +15,6 @@ services:
|
||||
image: registry.gitlab.com/sahkoinsinoorikilta/vtmk/web2.0-backend:latest
|
||||
deploy:
|
||||
replicas: 1
|
||||
restart_policy:
|
||||
condition: on-failure
|
||||
update_config:
|
||||
order: start-first
|
||||
depends_on:
|
||||
|
||||
+1
-5
@@ -4,8 +4,6 @@ services:
|
||||
image: postgres:12
|
||||
deploy:
|
||||
replicas: 1
|
||||
restart_policy:
|
||||
condition: on-failure
|
||||
|
||||
environment:
|
||||
- POSTGRES_USER_FILE=/run/secrets/BACKEND_DB_USER
|
||||
@@ -22,8 +20,6 @@ services:
|
||||
image: registry.gitlab.com/sahkoinsinoorikilta/vtmk/web2.0-backend:latest
|
||||
deploy:
|
||||
replicas: 1
|
||||
restart_policy:
|
||||
condition: on-failure
|
||||
update_config:
|
||||
order: start-first
|
||||
depends_on:
|
||||
@@ -47,7 +43,7 @@ services:
|
||||
- DB_USER_FILE=/run/secrets/BACKEND_DB_USER
|
||||
- DB_PASSWD_FILE=/run/secrets/BACKEND_DB_PASSWD
|
||||
- HOST=api.sahkoinsinoorikilta.fi
|
||||
- FRONTEND_URL=prod.sahkoinsinoorikilta.fi
|
||||
- FRONTEND_URL=sahkoinsinoorikilta.fi
|
||||
- DB_HOST=db
|
||||
- DB_PORT=5432
|
||||
- EMAIL_API_KEY_FILE=/run/secrets/BACKEND_EMAIL_API_KEY
|
||||
|
||||
Reference in New Issue
Block a user