Skip to content

Instantly share code, notes, and snippets.

@nnzo
Created November 22, 2019 08:45
Show Gist options
  • Save nnzo/572878bd94bd89e5b727d1b613713758 to your computer and use it in GitHub Desktop.
Save nnzo/572878bd94bd89e5b727d1b613713758 to your computer and use it in GitHub Desktop.
version: '3'
services:
traefik:
image: traefik:1.7-alpine
command:
# Redirect all HTTP requests to HTTPS
- '--entrypoints=Name:http Address::80 Redirect.EntryPoint:https'
- '--entrypoints=Name:https Address::443 TLS'
- '--defaultentrypoints=http,https'
# Tell Traefik to look for docker containers
- '--docker'
# Enable Let's Encrypt
- '--acme'
- '--acme.storage=/etc/traefik/acme/acme.json'
- '--acme.entryPoint=https'
- '--acme.httpChallenge.entryPoint=http'
- '--acme.OnHostRule=true'
- '--acme.onDemand=false'
# Note change this value to your email address so Let's Encrypt can notify you
# of any certificate experiations
- '--acme.email=atomiclemon@protonmail.com'
ports:
# Traefik will handle all incoming requests and route them to the correct container
# Only Traefik has ports exposed to the public network
- '80:80'
- '443:443'
networks:
- web
volumes:
# Store the Traefik Let's Encrypt settings and keys
- acme-storage:/etc/traefik/acme
# Allow Traefik to discover containers
- /var/run/docker.sock:/var/run/docker.sock
frontend:
image: atomiclemon/sharkdex-frontend:latest
environment:
# Note: you should change this value to your domain
REACT_APP_RELAYER_URL: 'https://myurlcensored/v2'
REACT_APP_THEME_NAME: 'DARK_THEME'
REACT_APP_NETWORK_ID: 1
command: yarn build
volumes:
- frontend-assets:/app/build
backend:
image: 0xorg/launch-kit-backend:latest
environment:
HTTP_PORT: '3000'
RPC_URL: 'https://mainnet.infura.io/v3/cff15f81182f44e581cf249bb7e296fc'
NETWORK_ID: '1'
WHITELIST_ALL_TOKENS: 'true'
FEE_RECIPIENT: '0x2EC6f3b0B64b82Ce6b9e6a96401380C287eBd8f4'
MAKER_FEE_ZRX_UNIT_AMOUNT: '1'
TAKER_FEE_ZRX_UNIT_AMOUNT: '1'
labels:
# Tell Traefik to resolve backend.j.0xproject.com to this container
# Note: you should change this value to your domain
- 'traefik.frontend.rule=Host:myurlcensored'
# Tell Traefik that this container listens on port 3000
- 'traefik.frontend.port=3000'
networks:
- web
nginx:
image: nginx
volumes:
- frontend-assets:/usr/share/nginx/html
labels:
# Tell Traefik to resolve frontend.j.0xproject.com to this container
# Note: you should change this value to your domain
- 'traefik.frontend.rule=Host:myurlcensored'
# Tell Traefik that this container listens on port 80
- 'traefik.frontend.port=80'
networks:
- web
volumes:
frontend-assets:
backend-database:
acme-storage:
networks:
web:
external:
name: web
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment