docker-compose.yml 4.2 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"
45
        ALLGO_HTTP_SERVER: "django"
CAMPION Sebastien's avatar
CAMPION Sebastien committed
46 47 48
        ALLGO_EMAIL_BACKEND: "django.core.mail.backends.console.EmailBackend"


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

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


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

CAMPION Sebastien's avatar
CAMPION Sebastien committed
63 64
  dev-registry:
    container_name: dev-registry
65
    build: registry
66
    user: "$DOCKERUSER"
CAMPION Sebastien's avatar
CAMPION Sebastien committed
67 68
    ports:
        - "5000:5000"
CAMPION Sebastien's avatar
CAMPION Sebastien committed
69
    volumes:
70
        - "/data/dev/registry:/vol"
CAMPION Sebastien's avatar
CAMPION Sebastien committed
71
    environment:
72
        REGISTRY_LOG_LEVEL: "info"
73
    networks: [dev]
BAIRE Anthony's avatar
BAIRE Anthony committed
74

CAMPION Sebastien's avatar
CAMPION Sebastien committed
75 76
  # CONTROLLER
  ######################################################################################################################
BAIRE Anthony's avatar
BAIRE Anthony committed
77

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

BAIRE Anthony's avatar
BAIRE Anthony committed
92

CAMPION Sebastien's avatar
CAMPION Sebastien committed
93 94
  # MYSQL
  ######################################################################################################################
95

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

CAMPION Sebastien's avatar
CAMPION Sebastien committed
106 107 108 109

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

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

CAMPION Sebastien's avatar
CAMPION Sebastien committed
122 123 124 125

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

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

CAMPION Sebastien's avatar
CAMPION Sebastien committed
141 142
  # SMTP
  ######################################################################################################################
BAIRE Anthony's avatar
BAIRE Anthony committed
143

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

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

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

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

CAMPION Sebastien's avatar
CAMPION Sebastien committed
167 168 169 170

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

171 172 173 174 175
  dev-toolbox:
    container_name: dev-toolbox
    build: toolbox
    volumes:
        - "/data/dev/toolbox:/vol"