-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
117 lines (97 loc) · 2.21 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
version: '3.7'
x-environment: &common-env
# General
FILES_FOLDER: ${FILES_FOLDER}
# Postgres
DB_NAME: ${DB_NAME}
DB_USER: ${DB_USER}
DB_PASSWORD: ${DB_PASSWORD}
DB_HOST: ${DB_HOST}
DB_PORT: ${DB_PORT}
# Redis
REDIS_HOST: 'musicnet'
REDIS_PORT: ${REDIS_PORT}
# RabbitMQ
RABBITMQ_AUTO_ACK: ${RABBITMQ_AUTO_ACK}
RABBITMQ_USERNAME: ${RABBITMQ_USERNAME}
RABBITMQ_PASSWORD: ${RABBITMQ_PASSWORD}
RABBITMQ_HOST: ${RABBITMQ_HOST}
RABBITMQ_PORT: ${RABBITMQ_PORT}
RABBITMQ_QUEUE: ${RABBITMQ_QUEUE}
RABBITMQ_VHOST: ${RABBITMQ_VHOST}
# S3
ENDPOINT_URL: ${ENDPOINT_URL}
AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID}
AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY}
AWS_STORAGE_BUCKET_NAME: ${AWS_STORAGE_BUCKET_NAME}
# Shazam
SHAZAM_API_KEY: ${SHAZAM_API_KEY}
SHAZAM_URL: ${SHAZAM_URL}
SHAZAM_HOST: ${SHAZAM_HOST}
# Spotify
SPOTIFY_API_KEY: ${SPOTIFY_API_KEY}
SPOTIFY_SEARCH_URL: ${SPOTIFY_SEARCH_URL}
SPOTIFY_RECOMMENDATION_URL: ${SPOTIFY_RECOMMENDATION_URL}
SPOTIFY_HOST: ${SPOTIFY_HOST}
# Mail
MAIL_URL: ${MAIL_URL}
MAIL_API_KEY: ${MAIL_API_KEY}
MAIL_DOMAIN_NAME: ${MAIL_DOMAIN_NAME}
services:
api:
container_name: music_api
image: main_service
restart: always
environment:
<<: *common-env
volumes:
- ./:/code
expose:
- 8000
ports:
- "8000:8000"
networks:
- musicnet
entrypoint: "./main-entrypoint.sh"
event_consumer:
container_name: music_consumer
image: main_service
restart: always
depends_on:
- redis
environment:
<<: *common-env
volumes:
- ./:/code
networks:
- musicnet
entrypoint: "./consumer-entrypoint.sh"
scheduler:
container_name: music_scheduler
image: main_service
restart: always
depends_on:
- redis
environment:
<<: *common-env
volumes:
- ./:/code
networks:
- musicnet
entrypoint: "./consumer-entrypoint.sh"
redis:
image: redis:alpine
restart: always
command: redis-server
volumes:
- general_redis_data:/data
ports:
- "6379:6379"
container_name: redis
networks:
- musicnet
networks:
musicnet:
external: true
volumes:
general_redis_data: