docker-compose.yml 4.61 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
        - "8080:8080"
BAIRE Anthony's avatar
BAIRE Anthony committed
26
    #command: "python3 manage.py runserver 0.0.0.0:8000"
CAMPION Sebastien's avatar
CAMPION Sebastien committed
27 28 29
    volumes:
        - "/data/dev/django:/vol"
        - "./django:/opt/allgo"
30
        - "./metrics:/opt/allgo_metrics"
CAMPION Sebastien's avatar
CAMPION Sebastien committed
31 32 33 34
    networks: [dev]
    tty: true
    stdin_open: true
    environment:
35
        ENV: dev
CAMPION Sebastien's avatar
CAMPION Sebastien committed
36 37
        PYTHONUNBUFFERED: 1
        DJANGO_DEBUG: 1
38
        DJANGO_LOG_LEVEL: "DEBUG"
39
        ALLGO_ALLOWED_HOSTS: 0.0.0.0,dev-django,localhost
40
        ALLGO_ALLOWED_IP_ADMIN: "0.0.0.0/0"
41
        ALLGO_DATASTORE: "/vol/rw/datastore"
CAMPION Sebastien's avatar
CAMPION Sebastien committed
42
        ALLGO_DEBUG: "True"
43
        ALLGO_ALLOW_LOCAL_ACCOUNTS: "True"
CAMPION Sebastien's avatar
CAMPION Sebastien committed
44
        ALLGO_JUPYTER_URL: "http://0.0.0.0:8000/hub/login"
sebastien letort's avatar
sebastien letort committed
45
        ALLGO_TOKEN_SIGNING_KEY_PATH: "/vol/ro/certs/tokens.key"
46
        ALLGO_HTTP_SERVER: "django"
CAMPION Sebastien's avatar
CAMPION Sebastien committed
47 48 49
        ALLGO_EMAIL_BACKEND: "django.core.mail.backends.console.EmailBackend"


50 51 52 53 54 55 56 57 58
  # JUPYTER HUB
  ######################################################################################################################

  dev-jupyterhub:
    container_name: dev-jupyterhub
    build: jupyterhub
    ports:
        - "8000:8000"
    volumes:
sebastien letort's avatar
sebastien letort committed
59
        - "/data/dev/django/ro/certs:/certs"
60
        - "./jupyterhub/jupyterhub_config.py:/srv/jupyterhub/jupyterhub_config.py"
61
        - "./django/allgo-logo.svg:/srv/jupyterhub/allgo_logo.svg"
sebastien letort's avatar
sebastien letort committed
62 63
        - "./jupyterhub/jupyter_notebook_config.py:/etc/jupyter/jupyter_notebook_config.py"
    networks: [dev]
64 65
    environment:
        JUPYTERHUB_LOG_LEVEL: "debug"
sebastien letort's avatar
sebastien letort committed
66
        JUPYTERHUB_JWT_KEY: "/certs/tokens.key"
67
        ALLGO_URL: "https://dev-django"
sebastien letort's avatar
sebastien letort committed
68
        # IFRAME_CSP: "http://localhost:8008" # we do not succeed in unsing it.
69 70


71 72 73 74 75 76 77 78 79 80 81
  # REDIS
  ######################################################################################################################

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


CAMPION Sebastien's avatar
CAMPION Sebastien committed
82 83
  # REGISTRY
  ######################################################################################################################
BAIRE Anthony's avatar
BAIRE Anthony committed
84

CAMPION Sebastien's avatar
CAMPION Sebastien committed
85 86
  dev-registry:
    container_name: dev-registry
87
    build: registry
88
    user: "$DOCKERUSER"
CAMPION Sebastien's avatar
CAMPION Sebastien committed
89 90
    ports:
        - "5000:5000"
CAMPION Sebastien's avatar
CAMPION Sebastien committed
91
    volumes:
92
        - "/data/dev/registry:/vol"
CAMPION Sebastien's avatar
CAMPION Sebastien committed
93
    environment:
94
        REGISTRY_LOG_LEVEL: "info"
95
    networks: [dev]
BAIRE Anthony's avatar
BAIRE Anthony committed
96

CAMPION Sebastien's avatar
CAMPION Sebastien committed
97 98
  # CONTROLLER
  ######################################################################################################################
BAIRE Anthony's avatar
BAIRE Anthony committed
99

100
  dev-controller:
101 102
    container_name: dev-controller
    build: controller
BAIRE Anthony's avatar
BAIRE Anthony committed
103
    volumes:
104 105
        - "/data/dev/controller:/vol"
        - "./controller:/opt/allgo-docker"
BAIRE Anthony's avatar
BAIRE Anthony committed
106 107 108
        - "/:/vol/host:ro"
    environment:
        ENV:        "dev"
BAIRE Anthony's avatar
BAIRE Anthony committed
109
        REGISTRY:   "localhost:5000"
110
        DEBUG:      "1"
111
        JOB_USER:   "$DOCKERUSER"
CAMPION Sebastien's avatar
CAMPION Sebastien committed
112
    networks: [dev]
BAIRE Anthony's avatar
BAIRE Anthony committed
113

BAIRE Anthony's avatar
BAIRE Anthony committed
114

CAMPION Sebastien's avatar
CAMPION Sebastien committed
115 116
  # MYSQL
  ######################################################################################################################
117

118
  dev-mysql:
BAIRE Anthony's avatar
BAIRE Anthony committed
119 120
    container_name: dev-mysql
    build: mysql
BAIRE Anthony's avatar
BAIRE Anthony committed
121
    user: "$DOCKERUSER"
CAMPION Sebastien's avatar
CAMPION Sebastien committed
122 123
    ports:
        - "3306:3306"
BAIRE Anthony's avatar
BAIRE Anthony committed
124 125
    volumes:
        - "/data/dev/mysql:/vol"
126 127
    networks: [dev]

CAMPION Sebastien's avatar
CAMPION Sebastien committed
128 129 130 131

  # SSH
  ######################################################################################################################

132
  dev-ssh:
BAIRE Anthony's avatar
BAIRE Anthony committed
133 134 135
    container_name: dev-ssh
    build: ssh
    ports:
136
        - "127.0.0.1:2222:22"
BAIRE Anthony's avatar
BAIRE Anthony committed
137 138 139 140
    volumes:
        - "/data/dev/ssh:/vol"
        - "./ssh:/opt/allgo-ssh"
    environment:
141
        ENV:        "dev"
142
    networks: [dev, sandboxes]
BAIRE Anthony's avatar
BAIRE Anthony committed
143

CAMPION Sebastien's avatar
CAMPION Sebastien committed
144 145 146

  # SMTP
  ######################################################################################################################
BAIRE Anthony's avatar
BAIRE Anthony committed
147

148
  dev-smtpsink:
BAIRE Anthony's avatar
BAIRE Anthony committed
149 150 151 152 153 154
    container_name: dev-smtpsink
    build: smtpsink
    ports:
        - "127.0.0.1:143:143"
    volumes:
        - "/data/dev/smtpsink:/vol"
155 156
    networks: [dev]

CAMPION Sebastien's avatar
CAMPION Sebastien committed
157 158 159 160

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

161
  dev-nginx:
BAIRE Anthony's avatar
BAIRE Anthony committed
162 163 164 165 166 167 168
    container_name: dev-nginx
    build: nginx
    ports:
        - "127.0.0.1:80:80"
        - "127.0.0.1:443:443"
    volumes:
        - "/data/dev/nginx:/vol"
169
    networks: [dev]
170

CAMPION Sebastien's avatar
CAMPION Sebastien committed
171 172 173 174

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

175 176 177 178 179
  dev-toolbox:
    container_name: dev-toolbox
    build: toolbox
    volumes:
        - "/data/dev/toolbox:/vol"