Repository navigation
Expand file tree
/
Copy pathdocker-compose-dev.yaml
More file actions
86 lines (80 loc) · 2.37 KB
/
Copy pathdocker-compose-dev.yaml
File metadata and controls
86 lines (80 loc) · 2.37 KB
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
# Development stack for IceHRM.
#
# Based on icehrm-pro/docker-compose.yaml, adapted for this repo:
# - web container is built from Dockerfile-dev (Alpine + php-fpm + nginx + xdebug),
# source is bind-mounted so edits are live (no rebuild needed);
# - all published host ports are shifted into a 66xx scheme so this stack can run
# alongside icehrm-pro (9306/9081/1126/9082/9080) without conflicts.
#
# Published host ports:
# web -> http://localhost:5666
# mysql -> 127.0.0.1:9666
# phpmyadmin -> http://127.0.0.1:9667
# mailhog UI -> http://localhost:9668 (SMTP on 1166)
#
# A distinct project name keeps containers/volumes from colliding with the other
# IceHRM stacks (icehrm, icehrm-pro, icehrm-testing, ...).
name: icehrm-dev
services:
mysql:
image: mysql:8.0.32
container_name: icehrm-dev-mysql
ports:
# Loopback only — the dev database ships with known credentials, so it must
# not be listening on every interface.
- 127.0.0.1:9666:3306
environment:
MYSQL_ROOT_PASSWORD: IceHrmR00t
MYSQL_USER: dev
MYSQL_PASSWORD: dev
MYSQL_DATABASE: icehrm
volumes:
- ./docker/init.sql:/docker-entrypoint-initdb.d/setup.sql
- ./docker/development/db_data:/var/lib/mysql
icehrm:
build:
context: .
dockerfile: Dockerfile-dev
container_name: icehrm-dev-app
depends_on:
- mysql
ports:
- 5666:8080
environment:
ICE_CONFIG_FILE: ../docker/development/config/config.php
volumes:
- .:/var/www/html
icehrm-worker-dev:
build:
context: ./
dockerfile: Dockerfile-worker
args:
- EXE_ENV=development
container_name: icehrm-dev-worker
depends_on:
- icehrm
volumes:
- .:/var/www/html
- ./docker/development/config/config.php:/var/www/html/app/config.php
phpmyadmin-dev:
depends_on:
- mysql
image: phpmyadmin
container_name: icehrm-dev-pma
ports:
# Loopback only — this is an unauthenticated database console.
- "127.0.0.1:9667:80"
environment:
PMA_HOSTS: mysql
# Internal MySQL port on the compose network (not the host-published 9666).
PMA_PORT: 3306
PMA_USER: dev
PMA_PASSWORD: dev
mailhog:
image: ajoergensen/mailhog
container_name: icehrm-dev-mailhog
ports:
- "1166:1025"
- "9668:8025"
volumes:
db_data: