forked from klosowsk/Docker-React-ExpressAPI-MySQL
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
42 lines (38 loc) · 831 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
version: '3'
services:
web:
build: './app'
# Host port proxy to 80
ports:
- "80:3000"
volumes:
- ./app/src:/app/src
environment:
# If a production enviroment is desired, set the APP_ENV variable to production
# APP_ENV: 'production'
APP_ENV: 'development'
links:
- api
api:
build: './api'
# api host port defined the same as in the container
links:
- db
environment:
MYSQL_ROOT_PASSWORD: 'root'
ports:
- "3001:3001"
volumes:
- "./api:/api"
db:
# This image exposes the standard MySQL port (3306)
image: mysql:5.7
environment:
MYSQL_ROOT_PASSWORD: 'root'
phpmyadmin:
image: phpmyadmin/phpmyadmin
links:
- db
# phpmyadmin port defined to 3002
ports:
- "3002:80"