docker-compose.yml 3.73 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 30 31 32 33
    volumes:
        - "/data/dev/django:/vol"
        - "./django:/opt/allgo"
    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
        ALLGO_ALLOWED_HOSTS: 0.0.0.0,dev-django,localhost
39
        ALLGO_ALLOWED_IP_ADMIN: "0.0.0.0/0"
40
        ALLGO_DATASTORE: "/vol/rw/datastore"
CAMPION Sebastien's avatar
CAMPION Sebastien committed
41
        ALLGO_DEBUG: "True"
42
        ALLGO_ALLOW_LOCAL_ACCOUNTS: "True"
CAMPION Sebastien's avatar
CAMPION Sebastien committed
43
        ALLGO_JUPYTER_URL: "http://0.0.0.0:8000/hub/login"
44
        ALLGO_HTTP_SERVER: "django"
CAMPION Sebastien's avatar
CAMPION Sebastien committed
45 46 47
        ALLGO_EMAIL_BACKEND: "django.core.mail.backends.console.EmailBackend"


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

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

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

BAIRE Anthony's avatar
BAIRE Anthony committed
91

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

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

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

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

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

CAMPION Sebastien's avatar
CAMPION Sebastien committed
121 122 123

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

125
  dev-smtpsink:
BAIRE Anthony's avatar
BAIRE Anthony committed
126 127 128 129 130 131
    container_name: dev-smtpsink
    build: smtpsink
    ports:
        - "127.0.0.1:143:143"
    volumes:
        - "/data/dev/smtpsink:/vol"
132 133
    networks: [dev]

CAMPION Sebastien's avatar
CAMPION Sebastien committed
134 135 136 137

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

138
  dev-nginx:
BAIRE Anthony's avatar
BAIRE Anthony committed
139 140 141 142 143 144 145
    container_name: dev-nginx
    build: nginx
    ports:
        - "127.0.0.1:80:80"
        - "127.0.0.1:443:443"
    volumes:
        - "/data/dev/nginx:/vol"
146
    networks: [dev]
147

CAMPION Sebastien's avatar
CAMPION Sebastien committed
148 149 150 151

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

152 153 154 155 156
  dev-toolbox:
    container_name: dev-toolbox
    build: toolbox
    volumes:
        - "/data/dev/toolbox:/vol"