aboutsummaryrefslogtreecommitdiffstats
path: root/docker/pysite.dockerapp
blob: 4e90ff8742372001898bee71c928ce9ca25a2ae3 (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
version: 0.3.0
name: pysite
description: |
    Our community website, built on Django and PostgreSQL.
namespace: python-discord
maintainers:
  - name: Johannes Christ
    email: [email protected]

---
version: "3.6"
services:
    django:
        build:
            context: .
        command: docker/app/scripts/migrate_and_serve.sh
        ports:
            - "127.0.0.1:4000:4000"
        environment:
            DATABASE_URL: "postgres://${pg_user}:${pg_passwd}@${pg_host}/${pg_db}"
            DEBUG: 'false'
            SECRET_KEY: "${secret_key}"
        depends_on:
            - postgres

    postgres:
        image: postgres:11-alpine
        ports:
            - "127.0.0.1:5432:5432"
        environment:
            POSTGRES_DB: "${pg_db}"
            POSTGRES_USER: "${pg_user}"
            POSTGRES_PASSWORD: "${pg_passwd}"

---
pg_user: pysite
pg_db: pysite
pg_passwd: supersecretpassword
pg_host: postgres
secret_key: 'suitable-for-development-only'

# vim: ft=yaml: