docker-compose.yml 4.58 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"
BAIRE Anthony's avatar
BAIRE Anthony committed
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 36
        PYTHONUNBUFFERED: 1
        DJANGO_DEBUG: 1
37
        DJANGO_LOG_LEVEL: "DEBUG"
38 39
        ALLGO_ALLOWED_HOSTS: 0.0.0.0,dev-django,localhost
        ALLGO_DATASTORE: "/vol/rw/datastore"
CAMPION Sebastien's avatar
CAMPION Sebastien committed
40
        ALLGO_DEBUG: "True"
CAMPION Sebastien's avatar
CAMPION Sebastien committed
41
        ALLGO_JUPYTER_URL: "http://0.0.0.0:8000/hub/login"
42
        ALLGO_HTTP_SERVER: "django"
CAMPION Sebastien's avatar
CAMPION Sebastien committed
43 44
        ALLGO_EMAIL_BACKEND: "django.core.mail.backends.console.EmailBackend"
        ALLGO_SECRET_KEY: "nFgLEiedSJfYKyJA6WjkiGs8c23vokcVoM4DDLi9GsCX36TdsR"
45
        ALLGO_TOKEN_SIGNING_KEY_PATH: "/certs/server.key"
CAMPION Sebastien's avatar
CAMPION Sebastien committed
46 47


48 49 50 51 52 53 54 55 56 57 58
  # REDIS
  ######################################################################################################################

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


CAMPION Sebastien's avatar
CAMPION Sebastien committed
59 60
  # REGISTRY
  ######################################################################################################################
BAIRE Anthony's avatar
BAIRE Anthony committed
61

CAMPION Sebastien's avatar
CAMPION Sebastien committed
62 63 64 65 66
  dev-registry:
    container_name: dev-registry
    image: registry:2
    ports:
        - "5000:5000"
CAMPION Sebastien's avatar
CAMPION Sebastien committed
67 68 69 70 71
    volumes:
        - "./certs:/certs"
    environment:
        REGISTRY_LOG_LEVEL: "debug"
        REGISTRY_AUTH: "token"
CAMPION Sebastien's avatar
CAMPION Sebastien committed
72
        REGISTRY_AUTH_TOKEN_REALM: "http://0.0.0.0:8008/jwt/auth"
CAMPION Sebastien's avatar
CAMPION Sebastien committed
73 74 75 76
        REGISTRY_AUTH_TOKEN_SERVICE: "allgo_registry"
        REGISTRY_AUTH_TOKEN_ISSUER: "allgo_oauth"
        REGISTRY_AUTH_TOKEN_ROOTCERTBUNDLE: "/certs/server.crt"
        REGISTRY_NOTIFICATIONS_ENDPOINTS: "- name: notifications-test\n  url: http://dev-django:8000/registryhook\n  timeout: 5s\n  threshold: 8\n  backoff: 10s"
77
    networks: [dev]
BAIRE Anthony's avatar
BAIRE Anthony committed
78

CAMPION Sebastien's avatar
CAMPION Sebastien committed
79 80
  # CONTROLLER
  ######################################################################################################################
BAIRE Anthony's avatar
BAIRE Anthony committed
81

82
  dev-controller:
83 84
    container_name: dev-controller
    build: controller
BAIRE Anthony's avatar
BAIRE Anthony committed
85
    volumes:
86 87
        - "/data/dev/controller:/vol"
        - "./controller:/opt/allgo-docker"
BAIRE Anthony's avatar
BAIRE Anthony committed
88 89 90
        - "/:/vol/host:ro"
    environment:
        ENV:        "dev"
91
        REGISTRY:   "localhost:5000/allgo/dev"
92
        DEBUG:      "1"
CAMPION Sebastien's avatar
CAMPION Sebastien committed
93
    networks: [dev]
BAIRE Anthony's avatar
BAIRE Anthony committed
94

BAIRE Anthony's avatar
BAIRE Anthony committed
95

CAMPION Sebastien's avatar
CAMPION Sebastien committed
96 97
  # MYSQL
  ######################################################################################################################
98

99
  dev-mysql:
BAIRE Anthony's avatar
BAIRE Anthony committed
100 101
    container_name: dev-mysql
    build: mysql
BAIRE Anthony's avatar
BAIRE Anthony committed
102
    user: "$DOCKERUSER"
CAMPION Sebastien's avatar
CAMPION Sebastien committed
103 104
    ports:
        - "3306:3306"
BAIRE Anthony's avatar
BAIRE Anthony committed
105 106
    volumes:
        - "/data/dev/mysql:/vol"
107 108
    networks: [dev]

CAMPION Sebastien's avatar
CAMPION Sebastien committed
109 110 111 112

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

113
  dev-ssh:
BAIRE Anthony's avatar
BAIRE Anthony committed
114 115 116
    container_name: dev-ssh
    build: ssh
    ports:
117
        - "127.0.0.1:2222:22"
BAIRE Anthony's avatar
BAIRE Anthony committed
118 119 120 121
    volumes:
        - "/data/dev/ssh:/vol"
        - "./ssh:/opt/allgo-ssh"
    environment:
122
        ENV:        "dev"
123
    networks: [dev, sandboxes]
BAIRE Anthony's avatar
BAIRE Anthony committed
124

CAMPION Sebastien's avatar
CAMPION Sebastien committed
125 126 127 128

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

129
  dev-rails:
BAIRE Anthony's avatar
BAIRE Anthony committed
130 131
    container_name: dev-rails
    build: rails
BAIRE Anthony's avatar
BAIRE Anthony committed
132
    user: "$DOCKERUSER"
BAIRE Anthony's avatar
BAIRE Anthony committed
133
    ports:
BAIRE Anthony's avatar
BAIRE Anthony committed
134
        - "127.0.0.1:3000:8080"
BAIRE Anthony's avatar
BAIRE Anthony committed
135 136 137 138 139
    volumes:
        - "/data/dev/rails:/vol"
        - "./rails:/opt/allgo"
    environment:
        RAILS_ENV: development
CAMPION Sebastien's avatar
CAMPION Sebastien committed
140 141 142 143
    networks: [dev]
    tty: true
    stdin_open: true

CAMPION Sebastien's avatar
CAMPION Sebastien committed
144 145
  # SMTP
  ######################################################################################################################
BAIRE Anthony's avatar
BAIRE Anthony committed
146

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

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

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

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

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

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

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