-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
37 lines (36 loc) · 1.1 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
version: '3.7'
services:
db:
image: mysql:5.7
container_name: simple_db
restart: always
environment:
- MYSQL_ROOT_PASSWORD=password
- MYSQL_DATABASE=database
volumes:
- ./db/db.sql:/docker-entrypoint-initdb.d/db.sql
ports:
- "3306:3306"
networks:
local_net:
ipv4_address: 172.16.0.3
web:
image: php:7.2-apache
container_name: simple_web
build:
context: ./web
volumes:
- ./web/app/:/var/www/html/
ports:
- "80:80"
networks:
local_net:
ipv4_address: 172.16.0.2
depends_on:
- db
networks:
local_net:
ipam:
driver: default
config:
- subnet: "172.16.0.0/29"