-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathdocker-compose.yml
55 lines (47 loc) · 910 Bytes
/
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
version: "3.7"
x-defaults:
network: &network
networks:
- net
services:
php:
image: lamp
ports:
- 80:80
- 443:443
volumes:
- workspace:/var/www
configs:
- source: apache-vhosts
target: /etc/apache2/sites-available/000-default.conf
- source: php-ini
target: /usr/local/etc/php/conf.d/local.ini
<<: *network
db:
image: mysql:latest
ports:
- 3306:3306
environment:
- MYSQL_ROOT_PASSWORD_FILE=/run/secrets/db_pwd
- MYSQL_USER=dbuser
- MYSQL_PASSWORD=dbpass
volumes:
- data:/var/lib/mysql
secrets:
- db_pwd
<<: *network
networks:
net:
secrets:
db_pwd:
file: ./mysql/root_password.txt
configs:
apache-vhosts:
file: ./apache/vhosts.conf
php-ini:
file: ./php/local.ini
volumes:
workspace:
external: true
data:
external: true