/
docker-compose.yml
43 lines (41 loc) · 1.49 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
version: '3.3'
services:
base:
build:
context: ./
dockerfile: docker/base/Dockerfile
image: refactoring-examples-base
application:
build:
context: ./
dockerfile: docker/dev/Dockerfile
image: refactoring-examples-dev
volumes:
- ./docker/dev/vhost.conf:/etc/apache2/sites-enabled/000-default.conf
- ./docker/dev/xdebug.ini:/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
- .:/home/refactoring-examples/project
ports:
- "4000:80"
extra_hosts:
- "host.docker.internal:host-gateway"
depends_on:
- base
- database
database:
image: 'postgres:13.3-alpine'
environment:
POSTGRES_PASSWORD: main
POSTGRES_USER: main
POSTGRES_DB: main
ports:
# To allow the host machine to access the ports below, modify the lines below.
# For example, to allow the host to connect to port 3306 on the container, you would change
# "3306" to "3306:3306". Where the first port is exposed to the host and the second is the container port.
# See https://docs.docker.com/compose/compose-file/#ports for more information.
- '5432'
volumes:
- refactoring-examples-postgresql:/var/lib/postgresql/data
volumes:
refactoring-examples-postgresql:
external: true
refactoring-examples-ssl-certs: {}