-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
68 lines (62 loc) · 1.54 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
version: "3.8"
services:
#PHP Service
php:
container_name: php
build:
context: . #current directory
target: php
args:
- APP_ENV=${APP_ENV}
environment:
- APP_ENV=${APP_ENV}
- CONTAINER_ROLE=app
working_dir: /var/www
volumes:
- ./:/var/www
ports:
- 8000:8000
depends_on:
- database
- redis
#Database Container
database:
container_name: database
image: mysql:8.0
ports:
- 3306:3306
environment:
- MYSQL_DATABASE=${DB_DATABASE}
- MYSQL_USER=${DB_USERNAME}
- MYSQL_PASSWORD=${DB_PASSWORD}
- MYSQL_ROOT_PASSWORD=${DB_PASSWORD}
volumes:
- db-data:/var/lib/mysql
phpmyadmin:
image: phpmyadmin/phpmyadmin
container_name: phpmyadmin
ports:
- 3400:80
environment:
PMA_HOST: database
PMA_PORT: 3306
MYSQL_ROOT_PASSWORD: secret
depends_on:
- database
#Redis Server
redis:
image: redis:alpine
command: redis-server --appendonly yes --requirepass "${REDIS_PASSWORD}"
ports:
- 6379:6379
# Node
node:
build:
context: . #current directory
target: node
volumes:
- ./:/usr/services
- ./node_modules:/usr/src/node_modules
tty: true
volumes:
db-data: ~