aboutsummaryrefslogtreecommitdiffstats
path: root/docker-compose.yml
blob: 8519e7634078c89dec704e392f2c2555b5bedb86 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
### Docker compose setup file
# This file can be used to quickly set up a development server
# with code auto-reloading and automatic execution of migrations.
#
## Note
# This file is not intended to be used for production.
# The "migrate and server" script will automatically apply migrations
# and additionally use the Django development server which is
# unsuitable for production.

version: "3.6"
services:
  bot:
    image: pythondiscord/bot:django
    environment:
      BOT_TOKEN: ${BOT_TOKEN?bot token needs to be set}
      # Set me once you configured me in the Django Admin!
      BOT_API_KEY: ${BOT_API_KEY}

  postgres:
    image: postgres:11-alpine
    environment:
      POSTGRES_DB: pydis_site
      POSTGRES_PASSWORD: supersecretpassword
      POSTGRES_USER: pydis_site

  web:
    build:
      context: .
      dockerfile: docker/app/alpine/3.7/Dockerfile
    command: docker/app/migrate_and_serve.sh
    ports:
      - "127.0.0.1:8000:8000"
    depends_on:
      - postgres
    volumes:
      - .:/app:ro
    environment:
      DATABASE_URL: postgres://pydis_site:supersecretpassword@postgres/pydis_site
      DEBUG: "true"
      SECRET_KEY: suitable-for-development-only

# vim: sw=2 ts=2: