Skip to content

Commit

Permalink
Remove defunct nginx configs fopr new deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
ml-evs committed Nov 21, 2024
1 parent 6b4c520 commit 7239fee
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 326 deletions.
94 changes: 0 additions & 94 deletions .docker/nginx/include/nginx_datalab_dev_http.conf

This file was deleted.

89 changes: 0 additions & 89 deletions .docker/nginx/include/nginx_datalab_http.conf

This file was deleted.

90 changes: 0 additions & 90 deletions .docker/nginx/include/nginx_datalab_public_http.conf

This file was deleted.

51 changes: 1 addition & 50 deletions .docker/nginx/include/nginx_odbx_http.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ upstream gunicorn_rest_misc {
server unix:/tmp/gunicorn_rest_misc.sock fail_timeout=0;
}

upstream gunicorn_rest_dcgat {
server unix:/tmp/gunicorn_rest_dcgat.sock fail_timeout=0;
}

upstream gunicorn_rest_gnome {
server unix:/tmp/gunicorn_rest_gnome.sock fail_timeout=0;
}
Expand All @@ -22,10 +18,6 @@ upstream gunicorn_index {
server unix:/tmp/gunicorn_index.sock fail_timeout=0;
}

upstream gunicorn_rest_test {
server unix:/tmp/gunicorn_rest_test.sock fail_timeout=0;
}

map $remote_addr $internal {
default 0;
127.0.0.1 1;
Expand Down Expand Up @@ -134,7 +126,7 @@ server {

# set the correct host(s) for your site
server_name www.alexandria.odbx.science alexandria.odbx.science dcgat.odbx.science www.dcgat.odbx.science;

return 301 $scheme://alexandria.icams.rub.de/pbesol;
}

Expand Down Expand Up @@ -174,47 +166,6 @@ server {
}
}


# ELECTRIDES
server {
listen 443 ssl;
server_name www.electrides.modl-uclouvain.org electrides.modl-uclouvain.org electrides.odbx.science;

# add_header Content-Security-Policy "default-src 'none'; frame-ancestors 'none';";
ssl_certificate /etc/letsencrypt/live/www.odbx.science/modl-uclouvain_org_cert.cer;
ssl_certificate_key /etc/letsencrypt/live/www.odbx.science/modl-certif.key;
# copy of recommended SSL settings from
# https://github.com/certbox/certbot/blob/master/certbox-nginx/certbox_nginx/_internal/tls_config/options-ssl-nginx.conf
ssl_session_cache shared:le_nginx_SSL:10m;
ssl_session_timeout 1440m;
ssl_session_tickets off;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_prefer_server_ciphers off;
ssl_ciphers "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384";

return 301 $scheme://optimade.materialscloud.org/archive/c8-gy;
}

# TEST SERVER CONFIGURATION
server {
listen 443 ssl;
# add_header Content-Security-Policy "default-src 'none'; frame-ancestors 'none';";
include nginx_ssl.conf;

# set the correct host(s) for your site
server_name www.optimade-test.odbx.science optimade-test.odbx.science;

location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
# we don't want nginx trying to do something clever with
# redirects, we set the Host: header above already.
proxy_redirect off;
proxy_pass http://gunicorn_rest_test;
}
}

# INDEX META-DB SERVER CONFIGURATION
server {
listen 443 ssl;
Expand Down
4 changes: 2 additions & 2 deletions .docker/nginx/nginx_ssl.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ssl_certificate /etc/letsencrypt/live/www.odbx.science/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/www.odbx.science/privkey.pem;
ssl_certificate /etc/letsencrypt/live/optimade.odbx.science/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/optimade.odbx.science/privkey.pem;
# copy of recommended SSL settings from
# https://github.com/certbox/certbot/blob/master/certbox-nginx/certbox_nginx/_internal/tls_config/options-ssl-nginx.conf
ssl_session_cache shared:le_nginx_SSL:10m;
Expand Down
13 changes: 12 additions & 1 deletion .docker/odbx_rest_gnome_Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
FROM ghcr.io/materials-consortia/optimade:0.25.3
FROM ghcr.io/materials-consortia/optimade:1.1.5 AS builder
WORKDIR /app
COPY optimade-gnome/requirements.txt /app/
COPY optimade-gnome/optimade.yaml /app/
COPY optimade-gnome/data/ /app/data
RUN pip install -r requirements.txt

COPY optimade_gnome.json /app/production_config.json

COPY optimade-gnome/optimade.jsonl /app/optimade.jsonl

RUN pip install gunicorn

COPY optimade-gnome/start_production.sh /app/

ENV OPTIMADE_CONFIG_FILE=/app/production_config.json

ENTRYPOINT ["/app/start_production.sh"]

0 comments on commit 7239fee

Please sign in to comment.