-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
59 lines (53 loc) · 1.04 KB
/
docker-compose.yaml
File metadata and controls
59 lines (53 loc) · 1.04 KB
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
version: '3.3'
services:
db:
image: mysql:latest
container_name: mysql-db
restart: always
environment:
MYSQL_DATABASE: 'shortener_link'
MYSQL_PASSWORD: 'mysql'
MYSQL_ROOT_PASSWORD: 'mysql'
ports:
- '3306:3306'
expose:
- '3306'
volumes:
- type: bind
source: /var/lib/mysql
target: /var/lib/mysql
networks:
- backend
redis:
image: redis:latest
container_name: redis-db
restart: always
ports:
- 6379:6379
networks:
- backend
shortener:
image: link-shortener-image
container_name: link-shortener
restart: always
build:
context: .
dockerfile: ./Dockerfile
ports:
- 8080:8080
environment:
DB_NAME: 'shortener_link'
DB_USER: 'root'
DB_PASSWORD: 'mysql'
DB_HOST: 'mysql-db'
DB_PORT: 3306
REDIS_DB: 0
REDIS_DB_HOST: redis-db
REDIS_DB_PORT: 6379
networks:
- backend
depends_on:
- redis
- db
networks:
backend: