The server for Open Course World
at tangled-test 84 lines 2.4 kB view raw
1# This file is for local development. The production service description 2# is stored in portainer. 3# 4# Note that there is some duplication with defaults.env - this is because env_file 5# directives don't get interpolated into the docker-compose.yml. 6# see https://github.com/docker/compose/issues/3435 7# 8# Specifically, DB_PORT, CERTS_CACHE, etc variables have defaults here that 9# must match defaults.env. 10services: 11 db: 12 container_name: ocw-db 13 image: cockroachdb/cockroach:v22.2.6 14 environment: 15 - COCKROACH_DATABASE=opencourseworld 16 - COCKROACH_USER=root 17 command: 18 - start-single-node 19 - --insecure 20 - --sql-addr=:${DB_PORT:-5432} 21 - --listen-addr=:26257 22 - --locality=region=wizulus 23 ports: 24 - ${DB_PORT:-5432}:${DB_PORT:-5432} 25 volumes: 26 - './data/db:/cockroach/cockroach-data:rw' 27 - "./config/initdb:/docker-entrypoint-initdb.d:ro" 28 29 app: 30 ports: 31 - ${HTTP_PORT:-6001}:${HTTP_PORT:-6001} 32 - ${HTTPS_PORT:-6000}:${HTTPS_PORT:-6000} 33 volumes: 34 - './data/dumps:/app/data/dumps:rw' 35 - './data/course_import_cache:/app/data/course_import_cache:rw' 36 - './db/migrations:/app/db/migrations:rw' 37 38 # overwrite the scripts from Dockerfile so all the dev scripts are present 39 - './scripts:/app/scripts:ro' 40 build: 41 dockerfile: Dockerfile 42 43 command: 44 - bash 45 - '-c' 46 - 'source ./scripts/defaults.sh && exec /bin/server' 47 environment: 48 - DB_HOST=ocw-db 49 - LISTEN_ADDRESS_HTTP=:${HTTP_PORT:-6001} 50 - LISTEN_ADDRESS=:${HTTPS_PORT:-6000} 51 52 # inherit from .env and the os env 53 - APP_PORT 54 - DB_PORT 55 - HTTP_PORT 56 - HTTPS_PORT 57 - LISTEN_HOST 58 - DB_USER 59 - DB_NAME 60 - ENABLE_API_DEV_USER 61 - FORCE_HTTP 62 - DEBUG_LEVEL 63 - COURSE_IMPORT_REQUIRE_VERIFY 64 - COURSE_IMPORT_ENABLE_CACHE 65 - USE_DUMP_FOR_SEARCHES 66 - MIXED_DIFFICULTY 67 - DATA_VIEW_TYPE 68 - DUMP_FILENAME 69 - DUMP_THUMBS_FILENAME 70 - JWT_SECRET 71 - TWITCH_CLIENT_ID 72 - TWITCH_CLIENT_SECRET 73 - DISCORD_CLIENT_ID 74 - DISCORD_CLIENT_SECRET 75 - DISCORD_REPORT_TOKEN 76 - ENABLE_TAGS 77 - DB_SCHEMA_NAME 78 - AWS_ACCESS_KEY_ID 79 - AWS_SECRET_ACCESS_KEY 80 - APP_URLS 81 - API_URLS 82 - REDIRECT_URLS 83 - DYNA_URL 84 - DNS_WHITELIST