-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose-local.yml
74 lines (68 loc) · 1.59 KB
/
docker-compose-local.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
69
70
71
72
73
74
version: '3'
services:
nginx:
platform: linux/amd64
image: nginx:1.23.2-alpine
restart: on-failure:5
ports:
- 80:80
volumes:
- ./infra/nginx/conf/local.conf:/etc/nginx/conf.d/default.conf:ro
links:
- frontend
- back-php
- back-nginx
frontend:
build:
context: frontend/
dockerfile: frontend.Dockerfile
args:
REACT_APP_API_BASE_URL: http://localhost/api
platform: linux/amd64
restart: on-failure:5
back-php:
platform: linux/amd64
restart: on-failure:5
build:
target: app_dev
context: backend/
dockerfile: docker/php/Dockerfile
container_name: mydocgen_php
image: mydocgen-php-local
volumes:
- ./backend/:/var/www/html
links:
- mysql
- back-nginx
back-nginx:
build:
target: app_dev
context: backend/
dockerfile: docker/nginx/Dockerfile
platform: linux/amd64
restart: on-failure:5
container_name: back-nginx
image: mydocgen-nginx-local
volumes:
- ./backend/docker/nginx/http.conf:/etc/nginx/conf.d/default.conf
- ./backend/public:/var/www/html/public
# Uncomment ports section if you want to up only backend
# ports:
# - 80:80
mysql:
restart: on-failure:5
platform: linux/amd64
image: mysql:5.7
hostname: database_host
container_name: mydocgen_mysql
environment:
- MYSQL_ROOT_PASSWORD=password
- MYSQL_DATABASE=database
- MYSQL_USER=user
- MYSQL_PASSWORD=password
ports:
- "3310:3306"
volumes:
- db:/var/lib/mysql
volumes:
db: