8000 Better set up for docker-compose by juhoinkinen · Pull Request #636 · NatLibFi/Annif · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Better set up for docker-compose #636

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions annif/nginx/nginx.conf

This file was deleted.

30 changes: 16 additions & 14 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,29 @@ 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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that this changed to :latest, was this intended?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the tag is latest by default; this just makes the behaviour more explicit.

volumes:
- ${ANNIF_PROJECTS}:/annif-projects
user: ${MY_UID}:${MY_GID}
command: ["gunicorn", "annif:create_app()", "--bind", "0.0.0.0:8000", "--timeout", "600"]

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 <<EOF
cat > /etc/nginx/conf.d/default.conf <<EON
server {
listen 80;
server_name localhost;
location / {
proxy_pass http://annif_app:8000;
}
}
EON
nginx -g "daemon off;";
EOF'
0