summaryrefslogtreecommitdiff
path: root/docker-compose.yml
blob: 57511ec45846c95983b0036b919ddb6e045fb532 (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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
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.com/:/var/www/vainsocial
            - ../apigrabber:/apps/api
            - ../analyzer:/apps/cli

### 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_postgres_raw
            - vaindock_postgres_web
        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_raw
            - vaindock_postgres_web
        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

### Nginx Server Container ##################################
### The webroot is mapped to vainsocial.dev (entry in hosts file)

    nginx:
        container_name: 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:
            - "80:80"
            - "443:443"
        links:
            - php-fpm

### Python Container
    apigrabber:
        container_name: vaindock_apigrabber
        build: ../apigrabber
        volumes_from:
            - applications
        ports:
          - "8080:8080"
        links:
          - vaindock_postgres_raw
        environment:
          - POSTGRESQL_HOST=vaindock_postgres_raw
          - POSTGRESQL_PORT=5432
          - POSTGRESQL_DB=vainsocial-raw
          - POSTGRESQL_USER=vainraw
          - POSTGRESQL_PASSWORD=vainraw



### PostgreSQL Container - Web ####################################

    vaindock_postgres_web:
        container_name: vaindock_postgres_web
        build: ./postgres
        volumes:
            - vaindock_pg_web:/var/lib/postgresql/data
        ports:
            - "5432:5432"
        environment:
            POSTGRES_DB: vainsocial-web
            POSTGRES_USER: vainweb
            POSTGRES_PASSWORD: vainweb

### PostgreSQL Container - Raw ####################################

    vaindock_postgres_raw:
        container_name: vaindock_postgres_raw
        build: ./postgres
        volumes:
            - vaindock_pg_raw:/var/lib/postgresql/data
        ports:
            - "5433:5432"
        environment:
            POSTGRES_DB: vainsocial-raw
            POSTGRES_USER: vainraw
            POSTGRES_PASSWORD: vainraw

### pgAdmin Container #######################################

    pgadmin:
        container_name: vaindock_pgadmin
        build: ./pgadmin
        ports:
            - "5050:5050"
        links:
            - vaindock_postgres_raw
            - vaindock_postgres_web


### Volumes Setup ###########################################

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



### Apache Server Container #################################

    # apache2:
    #     build:
    #         context: ./apache2
    #         args:
    #             - PHP_SOCKET=php-fpm:9000
    #     volumes_from:
    #         - applications
    #     volumes:
    #         - ./logs/apache2:/var/log/apache2
    #     ports:
    #         - "80:80"
    #         - "443:443"
    #     links:
    #         - php-fpm