From db5b57234aa2eeef6de05fd096875711e6edc80b Mon Sep 17 00:00:00 2001 From: Juho Inkinen Date: Fri, 28 Oct 2022 16:13:04 +0300 Subject: [PATCH] Better set up for docker-compose - Remove annif/nginx directory - Write nginx.conf with Docker run command - Remove unnecessary bash container - Better name for Annif container --- annif/nginx/nginx.conf | 12 ------------ docker-compose.yml | 30 ++++++++++++++++-------------- 2 files changed, 16 insertions(+), 26 deletions(-) delete mode 100644 annif/nginx/nginx.conf diff --git a/annif/nginx/nginx.conf b/annif/nginx/nginx.conf deleted file mode 100644 index 6e3099571..000000000 --- a/annif/nginx/nginx.conf +++ /dev/null @@ -1,12 +0,0 @@ -upstream upstream_servers { - server gunicorn_server:8000; -} - -server { - listen 80; - server_name localhost; - - location / { - proxy_pass http://upstream_servers; - } -} diff --git a/docker-compose.yml b/docker-compose.yml index 5d573681b..aed2211ec 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,17 +2,8 @@ version: "3" services: - bash: - image: quay.io/natlibfi/annif - volumes: - - ${ANNIF_PROJECTS}:/annif-projects - user: ${MY_UID}:${MY_GID} - stdin_open: true - tty: true - command: bash - - gunicorn_server: - image: quay.io/natlibfi/annif + annif_app: + image: quay.io/natlibfi/annif:latest volumes: - ${ANNIF_PROJECTS}:/annif-projects user: ${MY_UID}:${MY_GID} @@ -20,9 +11,20 @@ services: nginx: image: nginx - volumes: - - ./annif/nginx/nginx.conf:/etc/nginx/conf.d/default.conf ports: - "80:80" depends_on: - - gunicorn_server + - annif_app + command: | + bash -c 'bash -s < /etc/nginx/conf.d/default.conf <