docker-compose.yml 4.28 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
        - "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 34
    volumes:
        - "/data/dev/django:/vol"
        - "./django:/opt/allgo"
        - "./certs:/certs"
    networks: [dev]
    tty: true
    stdin_open: true
    environment:
35
        ENV: dev
CAMPION Sebastien's avatar
CAMPION Sebastien committed
36
        DJANGO_DEBUG: 1
37
        DJANGO_LOG_LEVEL: "DEBUG"
CAMPION Sebastien's avatar
CAMPION Sebastien committed
38
        ALLGO_DEBUG: "True"
39
        ALLGO_HTTP_SERVER: "django"
CAMPION Sebastien's avatar
CAMPION Sebastien committed
40 41
        ALLGO_EMAIL_BACKEND: "django.core.mail.backends.console.EmailBackend"
        ALLGO_SECRET_KEY: "nFgLEiedSJfYKyJA6WjkiGs8c23vokcVoM4DDLi9GsCX36TdsR"
42
        ALLGO_TOKEN_SIGNING_KEY_PATH: "/certs/server.key"
CAMPION Sebastien's avatar
CAMPION Sebastien committed
43 44 45 46


  # REGISTRY
  ######################################################################################################################
BAIRE Anthony's avatar
BAIRE Anthony committed
47

CAMPION Sebastien's avatar
CAMPION Sebastien committed
48 49 50 51 52
  dev-registry:
    container_name: dev-registry
    image: registry:2
    ports:
        - "5000:5000"
BAIRE Anthony's avatar
BAIRE Anthony committed
53
    volumes:
CAMPION Sebastien's avatar
CAMPION Sebastien committed
54 55
        - "./certs:/certs"
    environment:
CAMPION Sebastien's avatar
CAMPION Sebastien committed
56
        REGISTRY_LOG_LEVEL: "debug"
CAMPION Sebastien's avatar
CAMPION Sebastien committed
57 58 59
        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
60
        REGISTRY_AUTH_TOKEN_REALM: "http://0.0.0.0:8008/tokens"
CAMPION Sebastien's avatar
CAMPION Sebastien committed
61 62 63
        REGISTRY_AUTH_TOKEN_SERVICE: "allgo_registry"
        REGISTRY_AUTH_TOKEN_ISSUER: "allgo_oauth"
        REGISTRY_AUTH_TOKEN_ROOTCERTBUNDLE: "/certs/server.crt"
64 65
        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
66

CAMPION Sebastien's avatar
CAMPION Sebastien committed
67 68
  # CONTROLLER
  ######################################################################################################################
BAIRE Anthony's avatar
BAIRE Anthony committed
69

70
  dev-controller:
71 72
    container_name: dev-controller
    build: controller
BAIRE Anthony's avatar
BAIRE Anthony committed
73
    volumes:
74 75
        - "/data/dev/controller:/vol"
        - "./controller:/opt/allgo-docker"
BAIRE Anthony's avatar
BAIRE Anthony committed
76 77 78
        - "/:/vol/host:ro"
    environment:
        ENV:        "dev"
79
        REGISTRY:   "localhost:5000/allgo/dev"
80
        DEBUG:      "1"
CAMPION Sebastien's avatar
CAMPION Sebastien committed
81
    networks: [dev]
BAIRE Anthony's avatar
BAIRE Anthony committed
82

BAIRE Anthony's avatar
BAIRE Anthony committed
83

CAMPION Sebastien's avatar
CAMPION Sebastien committed
84 85
  # MYSQL
  ######################################################################################################################
86

87
  dev-mysql:
BAIRE Anthony's avatar
BAIRE Anthony committed
88 89
    container_name: dev-mysql
    build: mysql
BAIRE Anthony's avatar
BAIRE Anthony committed
90
    user: "$DOCKERUSER"
CAMPION Sebastien's avatar
CAMPION Sebastien committed
91 92
    ports:
        - "3306:3306"
BAIRE Anthony's avatar
BAIRE Anthony committed
93 94
    volumes:
        - "/data/dev/mysql:/vol"
95 96
    networks: [dev]

CAMPION Sebastien's avatar
CAMPION Sebastien committed
97 98 99 100

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

101
  dev-ssh:
BAIRE Anthony's avatar
BAIRE Anthony committed
102 103 104
    container_name: dev-ssh
    build: ssh
    ports:
105
        - "127.0.0.1:2222:22"
BAIRE Anthony's avatar
BAIRE Anthony committed
106 107 108 109
    volumes:
        - "/data/dev/ssh:/vol"
        - "./ssh:/opt/allgo-ssh"
    environment:
110
        ENV:        "dev"
111
    networks: [dev, sandboxes]
BAIRE Anthony's avatar
BAIRE Anthony committed
112

CAMPION Sebastien's avatar
CAMPION Sebastien committed
113 114 115 116

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

117
  dev-rails:
BAIRE Anthony's avatar
BAIRE Anthony committed
118 119
    container_name: dev-rails
    build: rails
BAIRE Anthony's avatar
BAIRE Anthony committed
120
    user: "$DOCKERUSER"
BAIRE Anthony's avatar
BAIRE Anthony committed
121
    ports:
BAIRE Anthony's avatar
BAIRE Anthony committed
122
        - "127.0.0.1:3000:8080"
BAIRE Anthony's avatar
BAIRE Anthony committed
123 124 125 126 127
    volumes:
        - "/data/dev/rails:/vol"
        - "./rails:/opt/allgo"
    environment:
        RAILS_ENV: development
CAMPION Sebastien's avatar
CAMPION Sebastien committed
128 129 130 131
    networks: [dev]
    tty: true
    stdin_open: true

CAMPION Sebastien's avatar
CAMPION Sebastien committed
132 133
  # SMTP
  ######################################################################################################################
BAIRE Anthony's avatar
BAIRE Anthony committed
134

135
  dev-smtpsink:
BAIRE Anthony's avatar
BAIRE Anthony committed
136 137 138 139 140 141
    container_name: dev-smtpsink
    build: smtpsink
    ports:
        - "127.0.0.1:143:143"
    volumes:
        - "/data/dev/smtpsink:/vol"
142 143
    networks: [dev]

CAMPION Sebastien's avatar
CAMPION Sebastien committed
144 145 146 147

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

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

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

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

162 163 164 165 166
  dev-toolbox:
    container_name: dev-toolbox
    build: toolbox
    volumes:
        - "/data/dev/toolbox:/vol"