|
|
|
version: "2.0"
|
|
|
|
|
|
|
|
services:
|
|
|
|
# HTTP server configured to listen on 127.0.0.1:8080
|
|
|
|
nginx:
|
|
|
|
build:
|
|
|
|
context: .
|
|
|
|
volumes_from:
|
|
|
|
- cms:ro
|
|
|
|
ports:
|
|
|
|
- 127.0.0.1:8080:80
|
|
|
|
depends_on:
|
|
|
|
- quotes-api
|
|
|
|
- twitch-cache-api
|
|
|
|
- cms
|
|
|
|
|
|
|
|
# Quotes API service with /data/quotes mounted as database storage
|
|
|
|
# SECRET_KEY is needed for API key validation
|
|
|
|
quotes-api:
|
|
|
|
build:
|
|
|
|
context: ./quotes-api
|
|
|
|
volumes:
|
|
|
|
- /data/quotes:/quotes
|
|
|
|
environment:
|
|
|
|
- SQLALCHEMY_DATABASE_URI=sqlite:////quotes/quotes.db
|
|
|
|
- SECRET_KEY=__SECRET_KEY__
|
|
|
|
expose:
|
|
|
|
- 5000
|
|
|
|
|
|
|
|
# Twitch cache API service with /data/twitch-cache mounted as database storage
|
|
|
|
# TWITCH_CLIENT_ID, TWITCH_OAUTH_TOKEN, TWITCH_CHANNEL_ID and TWITCH_CHANNEL_NAME
|
|
|
|
# are needed for Twitch API access and synchronization
|
|
|
|
twitch-cache-api:
|
|
|
|
build:
|
|
|
|
context: ./twitch-cache-api
|
|
|
|
volumes:
|
|
|
|
- /data/twitch-cache:/twitch-cache
|
|
|
|
environment:
|
|
|
|
- SQLALCHEMY_DATABASE_URI=sqlite:////twitch-cache/twitch-cache.db
|
|
|
|
- TWITCH_CLIENT_ID=__TWITCH_CLIENT_ID__
|
|
|
|
- TWITCH_OAUTH_TOKEN=__TWITCH_OAUTH_TOKEN__
|
|
|
|
- TWITCH_CHANNEL_ID=__TWITCH_CHANNEL_ID__
|
|
|
|
- TWITCH_CHANNEL_NAME=__TWITCH_CHANNEL_NAME__
|
|
|
|
expose:
|
|
|
|
- 5000
|
|
|
|
|
|
|
|
# CMS service with /data/grav mounted as user data storage
|
|
|
|
cms:
|
|
|
|
build:
|
|
|
|
context: ./cms
|
|
|
|
volumes:
|
|
|
|
- /data/grav:/app/user
|
|
|
|
- /app
|
|
|
|
expose:
|
|
|
|
- 9000
|