-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
118 lines (110 loc) · 2.9 KB
/
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
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
services:
client:
image: singalong-client:1.0.0
build:
context: client/apps/controller
dockerfile: Dockerfile
container_name: singalong-client-container
ports:
- "80:80"
depends_on:
- server
networks:
- singalong-server
admin:
image: singalong-admin:1.0.0
build:
context: client/apps/admin
dockerfile: Dockerfile
container_name: singalong-admin-container
ports:
- "8081:80"
depends_on:
- server
networks:
- singalong-server
server:
image: singalong-server:1.0.0
build:
context: server
dockerfile: Dockerfile
container_name: server-container
ports:
- "8080:8080"
- "9092:9092"
- "5005:5005" # Debug port
depends_on:
- js-service
- mongodb
- minio
environment:
- SERVER_PORT=8080
- SPRING_PROFILES_ACTIVE=docker,secrets
- SPRING_APPLICATION_NAME=singalong-server
- SPRING_DATA_MONGODB_AUTHENTICATION_DATABASE=$MONGO_DB
- SPRING_DATA_MONGODB_AUTO_INDEX_CREATION=$MONGO_AUTO_INDEX_CREATION
- JAVA_TOOL_OPTIONS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005
networks:
- singalong-server
minio:
image: minio/minio
container_name: minio-container
ports:
- "9000:9000"
- "9001:9001"
environment:
MINIO_ACCESS_KEY: $MINIO_ACCESS_KEY
MINIO_SECRET_KEY: $MINIO_SECRET_KEY
volumes:
- $MINIO_DATA_PATH:/data
command: server /data --console-address ":9001"
networks:
- singalong-server
js-service:
image: singalong-js:1.0.0
build:
context: microservices/js-service
dockerfile: Dockerfile
container_name: js-service-container
ports:
- "3000:3000"
networks:
- singalong-server
volumes:
- $SONG_DOWNLOAD_PATH:/app/songs
mongodb:
image: mongo:latest
container_name: mongodb-container
ports:
- "27017:27017"
environment:
MONGO_INITDB_ROOT_USERNAME: $MONGO_INITDB_ROOT_USERNAME
MONGO_INITDB_ROOT_PASSWORD: $MONGO_INITDB_ROOT_PASSWORD
MONGO_INITDB_DATABASE: $MONGO_INITDB_DATABASE
MONGO_DB_USERNAME: $MONGO_DB_USERNAME
MONGO_DB_PASSWORD: $MONGO_DB_PASSWORD
volumes:
- mongodb_data_v6:/data/db
- ./init-mongo:/docker-entrypoint-initdb.d
networks:
- singalong-server
command: ["--bind_ip", "0.0.0.0"]
cloudflared:
image: cloudflare/cloudflared
container_name: cloudflared-container
command:
- "tunnel"
- "run"
- "$CLOUDFLARED_TUNNEL_NAME"
volumes:
- ./cloudflared-config.yml:/etc/cloudflared/config.yml
- ~/.cloudflared/cert.pem:/etc/cloudflared/cert.pem
- ~/.cloudflared/$CLOUDFLARED_TUNNEL_NAME.json:/etc/cloudflared/credentials.json
networks:
- singalong-server
networks:
singalong-server:
driver: bridge
volumes:
mongodb_data:
mongodb_data_v6: