-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
132 lines (127 loc) · 4.66 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
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
version: '3.4'
services:
backend_dependency:
container_name: backend_dependency
build:
context: ./
dockerfile: docker/dockerfile-dependency
user: 1000:1000
volumes:
- ${ROOT_PATH}:/app
command: ["install", "--prefer-source", "--no-interaction"]
backend:
container_name: backend
domainname: eds.dev
hostname: backend
restart: always
build:
context: ./
dockerfile: docker/dockerfile-backend
depends_on:
- backend_dependency
- db
volumes:
- ${ROOT_PATH}:/var/www/html
- ${ROOT_PATH}/docker/config/apache/hosts/api:/etc/apache2/sites-eds
# environment:
# PHP_IDE_CONFIG: "serverName=api.eds"
# XDEBUG_CONFIG: "remote_host=megatron remote_port=9001"
ports:
- '37000:80'
tty: true
stdin_open: true
links:
- 'db'
db:
container_name: db
domainname: db.eds.dev
hostname: db
restart: always
image: postgres:latest
ports:
- '39000:5432'
environment:
POSTGRES_DB: ${DB_NAME}
POSTGRES_SCHEMA: ${DB_SCHEMA}
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
db_migrate:
container_name: db_migrate
build:
context: ./
dockerfile: docker/dockerfile-db-migrate
volumes:
- ${ROOT_PATH}/app:/app
command: ["migrate", "-c", "/app/config/db/phinx.yml", "-e", "${DB_ENVIRONMENT}"]
depends_on:
- db
links:
- db
environment:
PHINX_DEV_DBADAPTER: ${DB_DEV_ADAPTER}
PHINX_DEV_DBHOST: ${DB_DEV_HOST}
PHINX_DEV_DBPORT: ${DB_DEV_PORT}
PHINX_DEV_DBNAME: ${DB_DEV_NAME}
PHINX_DEV_DBSCHEMA: ${DB_DEV_SCHEMA}
PHINX_DEV_DBUSER: ${DB_DEV_USER}
PHINX_DEV_DBPASS: ${DB_DEV_PASSWORD}
PHINX_DEV_DBCHARSET: ${DB_DEV_CHARSET}
PHINX_DEV_DBPREFIX: ${DB_DEV_PREFIX}
PHINX_PROD_DBADAPTER: ${DB_PROD_ADAPTER}
PHINX_PROD_DBHOST: ${DB_PROD_HOST}
PHINX_PROD_DBPORT: ${DB_PROD_PORT}
PHINX_PROD_DBNAME: ${DB_PROD_NAME}
PHINX_PROD_DBSCHEMA: ${DB_PROD_SCHEMA}
PHINX_PROD_DBUSER: ${DB_PROD_USER}
PHINX_PROD_DBPASS: ${DB_PROD_PASSWORD}
PHINX_PROD_DBCHARSET: ${DB_PROD_CHARSET}
PHINX_PROD_DBPREFIX: ${DB_PROD_PREFIX}
PHINX_TEST_DBADAPTER: ${DB_TEST_ADAPTER}
PHINX_TEST_DBHOST: ${DB_TEST_HOST}
PHINX_TEST_DBPORT: ${DB_TEST_PORT}
PHINX_TEST_DBNAME: ${DB_TEST_NAME}
PHINX_TEST_DBSCHEMA: ${DB_TEST_SCHEMA}
PHINX_TEST_DBUSER: ${DB_TEST_USER}
PHINX_TEST_DBPASS: ${DB_TEST_PASSWORD}
PHINX_TEST_DBCHARSET: ${DB_TEST_CHARSET}
PHINX_TEST_DBPREFIX: ${DB_TEST_PREFIX}
db_fixture:
container_name: db_fixture
build:
context: ./
dockerfile: docker/dockerfile-db-migrate
volumes:
- ${ROOT_PATH}/app:/app
command: ["seed:run", "-c", "/app/config/db/phinx.yml", "-e", "${DB_ENVIRONMENT}"]
depends_on:
- db_migrate
links:
- db
environment:
PHINX_DEV_DBADAPTER: ${DB_DEV_ADAPTER}
PHINX_DEV_DBHOST: ${DB_DEV_HOST}
PHINX_DEV_DBPORT: ${DB_DEV_PORT}
PHINX_DEV_DBNAME: ${DB_DEV_NAME}
PHINX_DEV_DBSCHEMA: ${DB_DEV_SCHEMA}
PHINX_DEV_DBUSER: ${DB_DEV_USER}
PHINX_DEV_DBPASS: ${DB_DEV_PASSWORD}
PHINX_DEV_DBCHARSET: ${DB_DEV_CHARSET}
PHINX_DEV_DBPREFIX: ${DB_DEV_PREFIX}
PHINX_PROD_DBADAPTER: ${DB_PROD_ADAPTER}
PHINX_PROD_DBHOST: ${DB_PROD_HOST}
PHINX_PROD_DBPORT: ${DB_PROD_PORT}
PHINX_PROD_DBNAME: ${DB_PROD_NAME}
PHINX_PROD_DBSCHEMA: ${DB_PROD_SCHEMA}
PHINX_PROD_DBUSER: ${DB_PROD_USER}
PHINX_PROD_DBPASS: ${DB_PROD_PASSWORD}
PHINX_PROD_DBCHARSET: ${DB_PROD_CHARSET}
PHINX_PROD_DBPREFIX: ${DB_PROD_PREFIX}
PHINX_TEST_DBADAPTER: ${DB_TEST_ADAPTER}
PHINX_TEST_DBHOST: ${DB_TEST_HOST}
PHINX_TEST_DBPORT: ${DB_TEST_PORT}
PHINX_TEST_DBNAME: ${DB_TEST_NAME}
PHINX_TEST_DBSCHEMA: ${DB_TEST_SCHEMA}
PHINX_TEST_DBUSER: ${DB_TEST_USER}
PHINX_TEST_DBPASS: ${DB_TEST_PASSWORD}
PHINX_TEST_DBCHARSET: ${DB_TEST_CHARSET}
PHINX_TEST_DBPREFIX: ${DB_TEST_PREFIX}