-
-
Notifications
You must be signed in to change notification settings - Fork 26
/
docker-compose.yml
56 lines (52 loc) · 1.69 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
version: '3.9'
services:
app:
build:
context: './'
dockerfile: '.docker/app/Dockerfile'
container_name: 'doika-app'
restart: 'unless-stopped'
working_dir: /var/www/doika_v2
ports:
- ${FORWARD_HTTP_PORT:-8080}:80
- ${FORWARD_HTTPS_PORT:-4430}:443
depends_on:
- mysql
volumes:
- ./.docker/www:/var/www/html # emulate main site (that hosts doika)
- ./:/var/www/doika_v2 # mount doika application outside web-server
- ./public:/var/www/html/doika # symlink public dir as "doika" to web-server
- ./.docker/app/config/apache/vhosts:/etc/apache2/sites-enabled
- ./.docker/app/data/apache/logs:/var/log/apache2
- ./.docker/app/config/php/php.ini:/usr/local/etc/php/php.ini
- ./.docker/app/data/composer/cache:/home/unicorn/.composer/cache:cached
environment:
IS_DOIKA_SYMLINKED: 1
COMPOSER_MEMORY_LIMIT: -1
mysql:
image: mysql:5.7
container_name: 'doika-mysql'
restart: unless-stopped
healthcheck:
test: ['CMD', 'mysqladmin', '-u$DB_USERNAME', '-p$DB_PASSWORD', 'ping', '-h', 'localhost']
environment:
MYSQL_DATABASE: ${DB_DATABASE}
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
MYSQL_PASSWORD: ${DB_PASSWORD}
MYSQL_USER: ${DB_USERNAME}
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
ports:
- ${FORWARD_DB_PORT:-33060}:3306
volumes:
- ./.docker/mysql/data:/var/lib/mysql
stop_grace_period: 1m
node:
image: node:lts-alpine
container_name: 'doika-node'
restart: unless-stopped
tty: true
working_dir: /app
volumes:
- ./:/app
- ./.docker/node/data/npm-cache:/root/.npm
- ./.docker/node/data/logs:/root/.npm/_logs