-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
102 lines (95 loc) · 2.27 KB
/
docker-compose.yml
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
version: '3.6'
networks:
vezadocker:
services:
php:
container_name: php_veza
build:
context: .
dockerfile: ./.docker/Dockerfile
working_dir: /app/veza
volumes:
- .:/app/veza
ports:
- "9000:9000"
environment:
DB_HOST: mysql
networks:
- vezadocker
nginx:
image: nginx:1.17
container_name: nginx_${DB_DATABASE}
depends_on:
- php
ports:
- 8000:80
- 8001:443
volumes:
- .:/app/veza
- ./.docker/.nginx/default.conf:/etc/nginx/conf.d/default.conf
- ./.docker/.nginx/frontend-gzip.conf:/etc/nginx/conf.d/compression.conf
- ./.docker/.nginx/veza-app.crt:/etc/nginx/veza-app.crt
- ./.docker/.nginx/veza-app.key:/etc/nginx/veza-app.key
networks:
- vezadocker
mysql:
image: mysql:5.7
container_name: mysql_${DB_DATABASE}
ports:
- ${DB_PORT}:3306
tty: true
depends_on:
- php
volumes:
- .:/app/veza
- ./.docker/.mysql:/var/lib/mysql
environment:
MYSQL_DATABASE: ${DB_DATABASE}
MYSQL_USER: ${DB_USERNAME}
MYSQL_PASSWORD: ${DB_PASSWORD}
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
networks:
- vezadocker
phpadmin:
image: phpmyadmin/phpmyadmin:5.0
container_name: phpadmin_${DB_DATABASE}
ports:
- 8080:80
depends_on:
- mysql
environment:
PMA_HOST: mysql
MYSQL_USER: ${DB_USERNAME}
MYSQL_PASSWORD: ${DB_PASSWORD}
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
networks:
- vezadocker
# ------------------- OPTIONAL --------------------- #
composer:
build:
context: .
dockerfile: ./.docker/composer/Dockerfile
container_name: composer_${DB_DATABASE}
tty: true
depends_on:
- php
working_dir: /app/veza
volumes:
- .:/app/veza
# command tail -F is added so container won't exit
command: sh -c "composer install -n --no-progress && tail -F /anything/here"
networks:
- vezadocker
node:
image: node:12.16.1-alpine
container_name: node_${DB_DATABASE}
tty: true
depends_on:
- php
working_dir: /app/veza
volumes:
- .:/app/veza
command: sh -c "yarn install && node"
networks:
- vezadocker
# ------------------ OPTIONAL --------------------- #