Coder Social home page Coder Social logo

biblibra's Introduction

Installation

It takes about a minute or so for all services to start. The docker environment will expose port 8081 for the web app and 8082 for Hasura GraphQL engine.

You need to set up a reverse proxy, such as Nginx in front of the docker environment. The web app should be exposed on 443 and Hasura should be exposed on 8080.

curl https://raw.githubusercontent.com/danieka/biblibra/main/docker-compose.prod.yml > docker-compose.yml
sed -i "s/myadminsecretkey/$(openssl rand -base64 32)/g" docker-compose.yml
docker-compose up -d

Your nginx config might look something like this:

server {
	root /var/www/html;
	index index.html index.htm index.nginx-debian.html;

	server_name $HOSTNAME;

	location / {
	    proxy_pass http://localhost:8081/;
    }

    listen [::]:443 ssl ipv6only=on; # managed by Certbot
    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/$HOSTNAME/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/$HOSTNAME/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

}

server {
	listen 8080 ssl;
    listen [::]:8080 ssl;

    ssl_certificate /etc/letsencrypt/live/$HOSTNAME/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/$HOSTNAME/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

	server_name $HOSTNAME;

	location / {
		proxy_pass http://localhost:8082/;
        }
}

server {
    if ($host = $HOSTNAME) {
        return 301 https://$host$request_uri;
    } # managed by Certbot


	listen 80;
	listen [::]:80;

	server_name $HOSTNAME;
    return 404; # managed by Certbot


}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.