Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
geo
geo-facility-data-manager
Commits
e241a74b
Commit
e241a74b
authored
2 years ago
by
Horacio Castellaro
Browse files
Options
Download
Email Patches
Plain Diff
New Tag 1.1.1 with ssl changes
parent
2a5e3bea
main
1.1.1
v2.0.2
v2.0.1
v1.1.8
v1.1.7
v1.1.6
v1.1.5
v1.1.4
v1.1.3
v1.1.2
No related merge requests found
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
docker-compose.yml
+6
-2
docker-compose.yml
nginx/gestor.conf
+1
-1
nginx/gestor.conf
nginx/gestor_ssl.conf
+32
-0
nginx/gestor_ssl.conf
src/.env
+0
-21
src/.env
src/config/settings/base_settings.py
+1
-0
src/config/settings/base_settings.py
src/config/settings/prod_settings.py
+8
-6
src/config/settings/prod_settings.py
with
48 additions
and
30 deletions
+48
-30
docker-compose.yml
+
6
-
2
View file @
e241a74b
...
...
@@ -5,7 +5,8 @@ services:
build
:
./src
container_name
:
django_data_manager
command
:
bash -c "python manage.py migrate
&& python manage.py runserver 0.0.0.0:8000"
&& gunicorn config.wsgi:application --bind 0.0.0.0:8000"
# && python manage.py runserver 0.0.0.0:8000"
volumes
:
-
./src:/usr/src/app/
...
...
@@ -36,7 +37,10 @@ services:
volumes
:
-
./importer:/app/importer
-
./nginx/gestor.conf:/opt/bitnami/nginx/conf/server_blocks/gestor.conf:ro
# Descomentar lo siguiente para utilizar nginx con certificados propios
# - ./nginx/gestor.conf_ssl:/opt/bitnami/nginx/conf/server_blocks/gestor.conf:ro
# - ./certificates/key.key:/etc/nginx/key.key
# - ./certificates/cert.crt:/etc/nginx/cert.crt
restart
:
on-failure
volumes
:
...
...
This diff is collapsed.
Click to expand it.
nginx/gestor.conf
+
1
-
1
View file @
e241a74b
server
{
listen
0
.
0
.
0
.
0
:
80
;
server_name
data_manager
.
com
;
server_name
_
;
#access_log /opt/bitnami/nginx/logs/yourapp_access.log;
#error_log /opt/bitnami/nginx/logs/yourapp_error.log;
...
...
This diff is collapsed.
Click to expand it.
nginx/gestor_ssl.conf
0 → 100644
+
32
-
0
View file @
e241a74b
server
{
listen
80
default_server
;
server_name
_
;
return
301
https
://$
host
$
request_uri
;
}
server
{
listen
443
ssl
;
server_name
_
;
ssl_certificate
cert
.
crt
;
ssl_certificate_key
key
.
key
;
ssl_protocols
TLSv1
TLSv1
.
1
TLSv1
.
2
;
ssl_ciphers
HIGH
:!
aNULL
:!
MD5
;
#access_log /opt/bitnami/nginx/logs/yourapp_access.log;
#error_log /opt/bitnami/nginx/logs/yourapp_error.log;
location
/ {
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
proxy_set_header
HOST
$
http_host
;
proxy_set_header
X
-
NginX
-
Proxy
true
;
proxy_pass
http
://
django
:
8000
;
proxy_redirect
off
;
}
location
/
importer
{
root
/
app
;
index
index
.
html
;
}
}
This diff is collapsed.
Click to expand it.
src/.env
deleted
100644 → 0
+
0
-
21
View file @
2a5e3bea
SECRET_KEY=mi_secret_key
ALLOWED_HOSTS='sgo-ub20-geo-d1.cepal.org, localhost, 127.0.0.1'
DJANGO_SETTINGS_MODULE=config.settings.prod_settings
DATABASE_URL=postgres://postgres:postgres@db:5432/data_manager
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
POSTGRES_DB=data_manager
CONTEXT="public"
ENVIRONMENT=""
MACHINE="demo"
HOST=""
APP_NAME="Gestor de datos estadísticos"
APP_VERSION="1.0"
SHOW_ENDPOINT=True
SHOW_ENVIRONMENT=True
SHOW_MACHINE=True
SHOW_CONTEXT=True
This diff is collapsed.
Click to expand it.
src/config/settings/base_settings.py
+
1
-
0
View file @
e241a74b
...
...
@@ -166,3 +166,4 @@ SHOW_ENDPOINT = env.bool('SHOW_ENDPOINT', False)
SHOW_ENVIRONMENT
=
env
.
bool
(
'SHOW_ENVIRONMENT'
,
False
)
SHOW_MACHINE
=
env
.
bool
(
'SHOW_MACHINE'
,
False
)
SHOW_CONTEXT
=
env
.
bool
(
'SHOW_CONTEXT'
,
False
)
CORS_ORIGIN_ALLOW_ALL
=
True
This diff is collapsed.
Click to expand it.
src/config/settings/prod_settings.py
+
8
-
6
View file @
e241a74b
...
...
@@ -14,9 +14,11 @@ STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
STATICFILES_DIRS
=
[]
STATIC_ROOT
=
os
.
path
.
join
(
BASE_DIR
,
'staticfiles'
)
SECURE_SSL_REDIRECT
=
True
SECURE_HSTS_SECONDS
=
2_592_000
SECURE_HSTS_INCLUDE_SUBDOMAINS
=
True
SECURE_HSTS_PRELOAD
=
True
SESSION_COOKIE_SECURE
=
True
CSRF_COOKIE_SECURE
=
True
#SECURE_SSL_REDIRECT = True
#SECURE_HSTS_SECONDS = 2_592_000
#SECURE_HSTS_INCLUDE_SUBDOMAINS = True
#SECURE_HSTS_PRELOAD = True
#SESSION_COOKIE_SECURE = True
#CSRF_COOKIE_SECURE = True
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help