summaryrefslogtreecommitdiff
path: root/docker-compose.yml
blob: d52637e09301ac594cd313f8f4b9c5dd96c823f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
version: '2'

services:

### Applications Code Container #############################

    applications:
        image: tianon/true
        volumes:
            # as long as all the Vainglory repo are checked out on the same level this will work just fine 
            # volume to map Vainsocial.com code. used by Workspace repo.
            - ../vainsocial/:/var/www/vainsocial

### Workspace Utilities Container ###########################

    workspace:
        container_name: vaindock_workspace
        build:
            context: ./workspace
            args:
                - INSTALL_XDEBUG=true
                - INSTALL_NODE=false  # required is node is not installed locally
                - INSTALL_YARN=false  
                - INSTALL_V8JS_EXTENSION=false
                - COMPOSER_GLOBAL_INSTALL=true  # required if composer is not installed locally
                - INSTALL_WORKSPACE_SSH=true
                - INSTALL_LARAVEL_ENVOY=false
                - INSTALL_DEPLOYER=false
                - PUID=1000
                - PGID=1000
                - NODE_VERSION=stable
                - YARN_VERSION=latest
                - TZ=UTC
        volumes_from:
            - applications
        extra_hosts:
            # IMPORTANT: Replace with your Docker Host IP (will be appended to /etc/hosts)
            - "dockerhost:10.0.75.1"
        ports:
           - "2222:22"
        links:
            - vaindock_rabbitmq
            - vaindock_postgres
        tty: true

### PHP-FPM Container #######################################

    php-fpm:
        container_name: vaindock_php-fpm
        build:
            context: ./php-fpm
            args:
                - INSTALL_XDEBUG=true
                - INSTALL_SOAP=false
                - INSTALL_MONGO=false
                - INSTALL_ZIP_ARCHIVE=false
                - INSTALL_BCMATH=false
                - INSTALL_PHPREDIS=true
                - INSTALL_MEMCACHED=false
                - INSTALL_OPCACHE=false
                - INSTALL_EXIF=false
            dockerfile: Dockerfile-70
        volumes_from:
            - applications
        expose:
            - "9000"
        links:
            - workspace
            - vaindock_postgres
        extra_hosts:
            # IMPORTANT: Replace with your Docker Host IP (will be appended to /etc/hosts)
            - "dockerhost:10.0.75.1"
        environment:
            # IMPORTANT: Set the Remote Interpreter entry matching name to `laravel`
            - PHP_IDE_CONFIG=serverName=laravel

    vaindock_nginx:
        build:
            context: ./nginx
            args:
                - PHP_UPSTREAM=php-fpm
        volumes_from:
            - applications
        volumes:
            - ./logs/nginx/:/var/log/nginx
            - ./nginx/sites/:/etc/nginx/sites-available
        ports:
            - "88:80"
            - "443:443"

    vaindock_apigrabber:
        build: ../apigrabber
        volumes:
          - ../apigrabber:/code
          - ../joblib:/code/joblib
        depends_on:
          - vaindock_rabbitmq
        environment:
          - RABBITMQ_HOST=vaindock_rabbitmq
        env_file:
          - local.env

    vaindock_processor:
        build: ../processor
        volumes:
          - ../processor:/code
          - ../joblib:/code/joblib
        depends_on:
          - vaindock_rabbitmq
          - vaindock_postgres
        environment:
          - RABBITMQ_HOST=vaindock_rabbitmq
          - POSTGRESQL_HOST=vaindock_postgres
          - POSTGRESQL_DB=vainsocial-web
          - POSTGRESQL_USER=vainweb
          - POSTGRESQL_PASSWORD=vainweb


    vaindock_postgres:
        image: postgres:9.6-alpine
        volumes:
            - vaindock_postgres-data:/var/lib/postgresql/data
        ports:
            - "5432:5432"
        environment:
            POSTGRES_DB: vainsocial-web
            POSTGRES_USER: vainweb
            POSTGRES_PASSWORD: vainweb


    vaindock_rabbitmq:
        image: rabbitmq:3-management-alpine
        volumes:
          - vaindock_rabbitmq-data:/var/lib/rabbitmq
        ports:
          - "4369:4369"
          - "5671:5671"
          - "5672:5672"
          - "25672:25672"
          - "8881:15672"  # management guest/guest
        environment:
          - RABBITMQ_HIPE_COMPILE=1

volumes:
    vaindock_postgres-data:
        driver: "local"
    vaindock_rabbitmq-data:
        driver: "local"
    sessions:    ## nothing is connected to this (- ./data/sessions:/sessions)
        driver: "local"