docker-compose.yml 4.54 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 25 26 27 28 29 30 31 32 33 34
        - "8008:8000"
    command: "python3 manage.py runserver 0.0.0.0:8000"
    volumes:
        - "/data/dev/django:/vol"
        - "./django:/opt/allgo"
        - "./certs:/certs"
    networks: [dev]
    tty: true
    stdin_open: true
    environment:
        PYTHONUNBUFFERED: 1
35
        ALLGO_ALLOWED_HOSTS: 0.0.0.0,dev-django
CAMPION Sebastien's avatar
CAMPION Sebastien committed
36
        DJANGO_DEBUG: 1
37
        DJANGO_LOG_LEVEL: "DEBUG"
CAMPION Sebastien's avatar
CAMPION Sebastien committed
38 39 40 41
        ALLGO_DEBUG: "True"
        ALLGO_EMAIL_BACKEND: "django.core.mail.backends.console.EmailBackend"
        ALLGO_SECRET_KEY: "nFgLEiedSJfYKyJA6WjkiGs8c23vokcVoM4DDLi9GsCX36TdsR"
        ALLGO_DATABASE_PASSWORD: "allgo"
42 43
        ALLGO_CONTROLLER_HOST: "dev-controller"
        ALLGO_CONTROLLER_PORT: "4567"
CAMPION Sebastien's avatar
CAMPION Sebastien committed
44 45 46 47 48 49 50 51 52 53
        SIGNING_KEY_PATH: "/certs/server.key"
        SIGNING_KEY_TYPE: "RSA"
        SIGNING_KEY_ALG: "RS256"
        ISSUER: "allgo_oauth"
        TOKEN_EXPIRATION: "3600"
        TOKEN_TYPE: "JWT"


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

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

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

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"
86
        REGISTRY:   "localhost:5000/allgo/dev"
87
        DEBUG:      "1"
CAMPION Sebastien's avatar
CAMPION Sebastien committed
88
    networks: [dev]
BAIRE Anthony's avatar
BAIRE Anthony committed
89

BAIRE Anthony's avatar
BAIRE Anthony committed
90

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

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

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

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

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

CAMPION Sebastien's avatar
CAMPION Sebastien committed
120 121 122 123

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

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

CAMPION Sebastien's avatar
CAMPION Sebastien committed
139 140
  # SMTP
  ######################################################################################################################
BAIRE Anthony's avatar
BAIRE Anthony committed
141

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

CAMPION Sebastien's avatar
CAMPION Sebastien committed
151 152 153 154

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

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

CAMPION Sebastien's avatar
CAMPION Sebastien committed
165 166 167 168

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

169 170 171 172
  dev-toolbox:
    container_name: dev-toolbox
    build: toolbox
    volumes:
CAMPION Sebastien's avatar
CAMPION Sebastien committed
173
        - "/data/dev/toolbox:/vol"