-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.dev.yml
51 lines (49 loc) · 975 Bytes
/
docker-compose.dev.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
version: '3.8'
services:
db:
container_name: mysql_shortner
image: mysql
restart: always
environment:
MYSQL_DATABASE: 'urlDB'
# Password for root access
MYSQL_ROOT_PASSWORD: '1234'
MYSQL_TCP_PORT: 3306
ports:
# <Port exposed> : <MySQL Port running inside container>
- '3306:3306'
expose:
# Opens port 3306 on the container
- '3306'
# Where our data will be persisted
volumes:
- o-db:/var/lib/mysql
redis:
container_name: redis
image: redis:7-alpine
restart: always
ports:
- '6379:6379'
volumes:
- cache:/data
o-shortener:
container_name: o-shortener_container
build:
context: .
args:
- NODE_ENV=development
volumes:
- ./src:/app/src
ports:
- "3000:3000"
env_file:
- ./.env
links:
- db
- redis
volumes:
o-db:
driver: local
cache:
driver: local
o-shortener: