-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
39 lines (39 loc) · 1.21 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
version: '2'
services:
app-service:
container_name: ${APP_CONTAINER_NAME}
build:
context: .
dockerfile: Dockerfile-app
args:
- SITE_NAME=${SITE_NAME}
- SERVER_ADMIN=${SERVER_ADMIN}
- SERVER_LOCALE=${SERVER_LOCALE}
- APACHE_LOG_DIR=${APACHE_LOG_DIR}
restart: always
ports:
- ${APP_EXTERNAL_PORT}:80
volumes:
- ./www:/var/www
environment:
- DATABASE_INTERNAL_PORT=${DATABASE_INTERNAL_PORT}
- DATABASE_NAME=${DATABASE_NAME_VALUE}
- DATABASE_USER=${DATABASE_USER_VALUE}
- DATABASE_PASSWORD=${DATABASE_PASSWORD_VALUE}
links:
- sql-service:database
working_dir: /var/www/${SITE_NAME}
sql-service:
container_name: ${SQL_CONTAINER_NAME}
image: ${SQL_IMAGE}
environment:
- ${DATABASE_NAME_TAG}=${DATABASE_NAME_VALUE}
- ${DATABASE_USER_TAG}=${DATABASE_USER_VALUE}
- ${DATABASE_PASSWORD_TAG}=${DATABASE_PASSWORD_VALUE}
- ${DATABASE_ROOT_PASSWORD_TAG}=${DATABASE_ROOT_PASSWORD_VALUE}
ports:
- ${DATABASE_EXTERNAL_PORT}:${DATABASE_INTERNAL_PORT}
volumes:
- ${DATABASE_EXTERNAL_VOLUME}:${DATABASE_INTERNAL_VOLUME}
user: mysql
command: ${DATABASE_COMMAND}