-
Notifications
You must be signed in to change notification settings - Fork 20
/
docker-compose.yml
52 lines (51 loc) · 1.35 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
version: '3'
services:
web:
build:
dockerfile: Dockerfile
context: 'nginx'
ports:
- '8100:80'
- '8200:81'
volumes:
# Application testing
- ./frontend/web:/app/frontend/web:delegated
- ./backend/web:/app/backend/web:delegated
links:
- php
php:
build:
dockerfile: Dockerfile-${DOCKERFILE_FLAVOUR}
context: 'php'
args:
- PHP_BASE_IMAGE_VERSION=${PHP_BASE_IMAGE_VERSION}
image: ${PHP_IMAGE_NAME}:${PHP_BASE_IMAGE_VERSION}${PHP_IMAGE_VERSION_SUFFIX}
environment:
- GITHUB_API_TOKEN=${GITHUB_API_TOKEN}
- PHP_ENABLE_XDEBUG
- TEST_RUNTIME_PATH=/tmp/runtime
volumes:
- ./:/app:delegated
# Composer cache
- ~/.composer/cache:/root/.composer/cache:delegated
links:
- db
db:
image: mysql:5.7
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_USER: username
MYSQL_PASSWORD: password
MYSQL_DATABASE: yii2advanced
volumes:
- ./db/data:/var/lib/mysql
- ./db/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
# db:
# image: postgres:13-alpine
# environment:
# POSTGRES_USER: username
# POSTGRES_PASSWORD: password
# POSTGRES_DB: yii2advanced
# volumes:
# - ./db/data:/var/lib/postgresql/data
# - ./db/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d