docker-compose.yml 5.53 KB
Newer Older
BAIRE Anthony's avatar
BAIRE Anthony committed
1
# vim:sts=4:sw=4:et:
2 3 4

version: '2'

CAMPION Sebastien's avatar
CAMPION Sebastien committed
5

6 7 8 9 10 11
networks:
    dev:
        driver: bridge
    sandboxes:
        driver: bridge

CAMPION Sebastien's avatar
CAMPION Sebastien committed
12

13
services:
BAIRE Anthony's avatar
BAIRE Anthony committed
14

CAMPION Sebastien's avatar
CAMPION Sebastien committed
15 16 17 18 19 20 21

  # DJANGO
  ######################################################################################################################

  dev-django:
    container_name: dev-django
    build: django
BAIRE Anthony's avatar
BAIRE Anthony committed
22
    user: "$DOCKERUSER"
BAIRE Anthony's avatar
BAIRE Anthony committed
23
    ports:
CAMPION Sebastien's avatar
CAMPION Sebastien committed
24
        - "8008:8000"
25
    command: "python3 manage.py runserver 0.0.0.0:8000"
CAMPION Sebastien's avatar
CAMPION Sebastien committed
26 27 28 29 30 31 32 33
    volumes:
        - "/data/dev/django:/vol"
        - "./django:/opt/allgo"
        - "./certs:/certs"
    networks: [dev]
    tty: true
    stdin_open: true
    environment:
34
        ENV: dev
CAMPION Sebastien's avatar
CAMPION Sebastien committed
35
        PYTHONUNBUFFERED: 1
CAMPION Sebastien's avatar
CAMPION Sebastien committed
36
        ALLGO_DJANGO_REGISTRY: "localhost:5000"
37 38
        ALLGO_DJANGO_REDIS_HOST: "dev-redis"
        ALLGO_DJANGO_MAXUPLOADSIZE: 16384
CAMPION Sebastien's avatar
CAMPION Sebastien committed
39
        DJANGO_DEBUG: 1
40
        DJANGO_LOG_LEVEL: "DEBUG"
41 42
        ALLGO_ALLOWED_HOSTS: 0.0.0.0,dev-django,localhost
        ALLGO_DATASTORE: "/vol/rw/datastore"
CAMPION Sebastien's avatar
CAMPION Sebastien committed
43
        ALLGO_DEBUG: "True"
CAMPION Sebastien's avatar
CAMPION Sebastien committed
44
        ALLGO_JUPYTER_URL: "http://0.0.0.0:8000/hub/login"
CAMPION Sebastien's avatar
CAMPION Sebastien committed
45 46 47
        ALLGO_EMAIL_BACKEND: "django.core.mail.backends.console.EmailBackend"
        ALLGO_SECRET_KEY: "nFgLEiedSJfYKyJA6WjkiGs8c23vokcVoM4DDLi9GsCX36TdsR"
        ALLGO_DATABASE_PASSWORD: "allgo"
48 49
        ALLGO_CONTROLLER_HOST: "dev-controller"
        ALLGO_CONTROLLER_PORT: "4567"
CAMPION Sebastien's avatar
CAMPION Sebastien committed
50 51 52 53 54 55 56 57
        SIGNING_KEY_PATH: "/certs/server.key"
        SIGNING_KEY_TYPE: "RSA"
        SIGNING_KEY_ALG: "RS256"
        ISSUER: "allgo_oauth"
        TOKEN_EXPIRATION: "3600"
        TOKEN_TYPE: "JWT"


58 59 60 61 62 63 64 65 66 67 68
  # REDIS
  ######################################################################################################################

  dev-redis:
    container_name: dev-redis
    image: redis:alpine
    ports:
        - "6379:6379"
    networks: [dev]


CAMPION Sebastien's avatar
CAMPION Sebastien committed
69 70
  # REGISTRY
  ######################################################################################################################
BAIRE Anthony's avatar
BAIRE Anthony committed
71

CAMPION Sebastien's avatar
CAMPION Sebastien committed
72 73 74 75 76
  dev-registry:
    container_name: dev-registry
    image: registry:2
    ports:
        - "5000:5000"
BAIRE Anthony's avatar
BAIRE Anthony committed
77
    volumes:
CAMPION Sebastien's avatar
CAMPION Sebastien committed
78 79
        - "./certs:/certs"
    environment:
CAMPION Sebastien's avatar
CAMPION Sebastien committed
80
        REGISTRY_LOG_LEVEL: "debug"
CAMPION Sebastien's avatar
CAMPION Sebastien committed
81 82 83
        REGISTRY_HTTP_TLS_CERTIFICATE: "/certs/server.crt"
        REGISTRY_HTTP_TLS_KEY: "/certs/server.key"
        REGISTRY_AUTH: "token"
CAMPION Sebastien's avatar
bugfix  
CAMPION Sebastien committed
84
        REGISTRY_AUTH_TOKEN_REALM: "http://0.0.0.0:8008/tokens"
CAMPION Sebastien's avatar
CAMPION Sebastien committed
85 86 87
        REGISTRY_AUTH_TOKEN_SERVICE: "allgo_registry"
        REGISTRY_AUTH_TOKEN_ISSUER: "allgo_oauth"
        REGISTRY_AUTH_TOKEN_ROOTCERTBUNDLE: "/certs/server.crt"
88 89
        REGISTRY_NOTIFICATIONS_ENDPOINTS: "- name: notifications-test\n  url: http://dev-django:8000/registryhook\n  timeout: 5s\n  threshold: 8\n  backoff: 10s"
    networks: [dev]
BAIRE Anthony's avatar
BAIRE Anthony committed
90

CAMPION Sebastien's avatar
CAMPION Sebastien committed
91 92 93
  # CONTROLLER
  ######################################################################################################################

94
  dev-controller:
95 96
    container_name: dev-controller
    build: controller
BAIRE Anthony's avatar
BAIRE Anthony committed
97
    volumes:
98 99
        - "/data/dev/controller:/vol"
        - "./controller:/opt/allgo-docker"
BAIRE Anthony's avatar
BAIRE Anthony committed
100 101 102
        - "/:/vol/host:ro"
    environment:
        ENV:        "dev"
103
        REGISTRY:   "localhost:5000/allgo/dev"
104
        DEBUG:      "1"
CAMPION Sebastien's avatar
CAMPION Sebastien committed
105
    networks: [dev]
BAIRE Anthony's avatar
BAIRE Anthony committed
106

BAIRE Anthony's avatar
BAIRE Anthony committed
107

CAMPION Sebastien's avatar
CAMPION Sebastien committed
108 109
  # MYSQL
  ######################################################################################################################
110

111
  dev-mysql:
BAIRE Anthony's avatar
BAIRE Anthony committed
112 113
    container_name: dev-mysql
    build: mysql
BAIRE Anthony's avatar
BAIRE Anthony committed
114
    user: "$DOCKERUSER"
CAMPION Sebastien's avatar
CAMPION Sebastien committed
115 116
    ports:
        - "3306:3306"
BAIRE Anthony's avatar
BAIRE Anthony committed
117 118
    volumes:
        - "/data/dev/mysql:/vol"
119 120
    networks: [dev]

CAMPION Sebastien's avatar
CAMPION Sebastien committed
121

CAMPION Sebastien's avatar
CAMPION Sebastien committed
122 123 124 125 126 127 128 129 130 131
  # JUPYTER HUB
  ######################################################################################################################

  dev-jupyterhub:
    container_name: dev-jupyterhub
    build: jupyterhub
    ports:
        - "8000:8000"
    volumes:
        - "./certs:/certs"
CAMPION Sebastien's avatar
CAMPION Sebastien committed
132
        - "./jupyterhub/jupyterhub_config.py:/srv/jupyterhub/jupyterhub_config.py"
CAMPION Sebastien's avatar
CAMPION Sebastien committed
133 134
    environment:
        JUPYTERHUB_LOG_LEVEL: "debug"
CAMPION Sebastien's avatar
CAMPION Sebastien committed
135
        JUPYTERHUB_JWT_KEY: "/certs/server.key"
CAMPION Sebastien's avatar
CAMPION Sebastien committed
136 137 138

    networks: [dev]

CAMPION Sebastien's avatar
CAMPION Sebastien committed
139 140 141
  # SSH
  ######################################################################################################################

142
  dev-ssh:
BAIRE Anthony's avatar
BAIRE Anthony committed
143 144 145
    container_name: dev-ssh
    build: ssh
    ports:
146
        - "127.0.0.1:2222:22"
BAIRE Anthony's avatar
BAIRE Anthony committed
147 148 149 150
    volumes:
        - "/data/dev/ssh:/vol"
        - "./ssh:/opt/allgo-ssh"
    environment:
151
        ENV:        "dev"
152
    networks: [dev, sandboxes]
BAIRE Anthony's avatar
BAIRE Anthony committed
153

CAMPION Sebastien's avatar
CAMPION Sebastien committed
154 155 156 157

  # RAILS
  ######################################################################################################################

158
  dev-rails:
BAIRE Anthony's avatar
BAIRE Anthony committed
159 160
    container_name: dev-rails
    build: rails
BAIRE Anthony's avatar
BAIRE Anthony committed
161
    user: "$DOCKERUSER"
BAIRE Anthony's avatar
BAIRE Anthony committed
162
    ports:
BAIRE Anthony's avatar
BAIRE Anthony committed
163
        - "127.0.0.1:3000:8080"
BAIRE Anthony's avatar
BAIRE Anthony committed
164 165 166 167 168
    volumes:
        - "/data/dev/rails:/vol"
        - "./rails:/opt/allgo"
    environment:
        RAILS_ENV: development
CAMPION Sebastien's avatar
CAMPION Sebastien committed
169 170 171 172
    networks: [dev]
    tty: true
    stdin_open: true

CAMPION Sebastien's avatar
CAMPION Sebastien committed
173 174
  # SMTP
  ######################################################################################################################
BAIRE Anthony's avatar
BAIRE Anthony committed
175

176
  dev-smtpsink:
BAIRE Anthony's avatar
BAIRE Anthony committed
177 178 179 180 181 182
    container_name: dev-smtpsink
    build: smtpsink
    ports:
        - "127.0.0.1:143:143"
    volumes:
        - "/data/dev/smtpsink:/vol"
183 184
    networks: [dev]

CAMPION Sebastien's avatar
CAMPION Sebastien committed
185 186 187 188

  # NGINX
  ######################################################################################################################

189
  dev-nginx:
BAIRE Anthony's avatar
BAIRE Anthony committed
190 191 192 193 194 195 196
    container_name: dev-nginx
    build: nginx
    ports:
        - "127.0.0.1:80:80"
        - "127.0.0.1:443:443"
    volumes:
        - "/data/dev/nginx:/vol"
197
    networks: [dev]
198

CAMPION Sebastien's avatar
CAMPION Sebastien committed
199 200 201 202

  # TOOLBOX
  ######################################################################################################################

203 204 205 206 207
  dev-toolbox:
    container_name: dev-toolbox
    build: toolbox
    volumes:
        - "/data/dev/toolbox:/vol"