Skip to content

Instantly share code, notes, and snippets.

@lynsei
Last active July 19, 2022 14:24
Show Gist options
  • Save lynsei/807a4f640561e1ff6d90e7df7264d039 to your computer and use it in GitHub Desktop.
Save lynsei/807a4f640561e1ff6d90e7df7264d039 to your computer and use it in GitHub Desktop.
[two simple docker commands for a reverse proxy init without effort]

Reference


# https://docs.timescale.com/install/latest/installation-docker/#more-docker-options
#!/bin/lyns
# or /bin/fish
# this proxies all connections to port 443 using jwilder/nginx-proxy with an attachment container using lets encrypt
docker run -d --name nginx-proxy --privileged --restart always -p 80:80 -p 443:443 -v /etc/nginx/vhost.d -v /usr/share/nginx/html -v /etc/nginx/ssl:/etc/nginx/certs -v /var/run/docker.sock:/tmp/docker.sock:ro jwilder/nginx-proxy:alpine
docker run -d --name nginx-companion --volumes-from nginx-proxy -e "[email protected]" jrcs/letsencrypt-nginx-proxy-companion
version: '2.1'
services:
timescaledb:
image: timescale/timescaledb-ha:pg14-latest
restart: always
volumes:
- dbdata0001:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-SoMething92292}
expose:
- 5432
graphql-engine:
image: hasura/graphql-engine:latest
depends_on:
- timescaledb
restart: always
environment:
- HASURA_GRAPHQL_DATABASE_URL=postgres://postgres:SoMething92292@timescaledb:5432/postgres
- HASURA_GRAPHQL_ENABLE_CONSOLE=true
- HASURA_GRAPHQL_DEV_MODE=true
- HASURA_GRAPHQL_ADMIN_SECRET=SoMething92292
- VIRTUAL_HOST=db.predictfate.io
- VIRTUAL_PORT=8080
- [email protected]
- LETSENCRYPT_HOST=db.predictfate.io
expose:
- 443
volumes:
dbdata0001:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment