-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
53 lines (50 loc) · 1.03 KB
/
Copy pathdocker-compose.yml
File metadata and controls
53 lines (50 loc) · 1.03 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
version: "3"
services:
db:
image: mysql
restart: always
command: --default-authentication-plugin=mysql_native_password
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: cqrs
MYSQL_USER: cqrs
MYSQL_PASSWORD: cqrs
volumes:
- ./mysql_data:/var/lib/mysql
ports:
- "3306:3306"
redis:
image: redis:alpine
restart: always
command: redis-server --requirepass cqrs
ports:
- "6379:6379"
volumes:
- ./redis-data:/var/lib/redis
- ./redis.conf:/usr/local/etc/redis/redis.conf
environment:
- REDIS_REPLICATION_MODE=master
app:
env_file:
- .env.local
build: .
command: ./main
environment:
DB_USER: cqrs
DB_PASSWORD: cqrs
DB_HOST: db
DB_PORT: 3306
DB_NAME: cqrs
REDIS_URL: redis:6379
REDIS_PASSWD: cqrs
volumes:
- ".:/go/src/github.com/JackMaarek/cqrs"
ports:
- "8000:8080"
links:
- db
- redis
depends_on:
- db
- redis
restart: always