-
Notifications
You must be signed in to change notification settings - Fork 11
/
docker-compose.yml
137 lines (132 loc) · 6.25 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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
version: '3.4'
services:
youtube-synch_httpApi:
image: youtube-synch:${IMAGE_TAG}
container_name: youtube-synch_httpApi
restart: on-failure
depends_on:
- redis
build:
context: .
dockerfile: Dockerfile
volumes:
- ./local/logs:/youtube-synch/local/logs
# mount Google Cloud's Application Default Credentials file. A default bind mount is created
# as workaround for scenario when `YT_SYNCH__YOUTUBE__ADC_KEY_FILE_PATH` will be undefined,
# since docker-compose does not support creating bind-mount volume with empty path.
- ${YT_SYNCH__YOUTUBE__ADC_KEY_FILE_PATH:-./package.json}:${YT_SYNCH__YOUTUBE__ADC_KEY_FILE_PATH:-/package.json}:ro
# mount the AWS credentials file to docker container home directory
- ~/.aws/:/root/.aws:ro # ? Not needed?
env_file:
- .env
environment:
DEPLOYMENT_ENV: ${DEPLOYMENT_ENV}
# YT_SYNCH__LOGS__ELASTIC: "{\"level\":\"debug\",\"endpoint\":\"http://elasticsearch:9200\"}"
# YT_SYNCH__ENDPOINTS__QUERY_NODE: ${YT_SYNCH__ENDPOINTS__QUERY_NODE}
# YT_SYNCH__ENDPOINTS__JOYSTREAM_NODE_WS: ${YT_SYNCH__ENDPOINTS__JOYSTREAM_NODE_WS}
YT_SYNCH__ENDPOINTS__REDIS__HOST: redis
YT_SYNCH__ENDPOINTS__REDIS__PORT: ${YT_SYNCH__ENDPOINTS__REDIS__PORT}
# YT_SYNCH__HTTP_API__PORT: ${YT_SYNCH__HTTP_API__PORT}
# YT_SYNCH__HTTP_API__OWNER_KEY: ${YT_SYNCH__HTTP_API__OWNER_KEY}
# YT_SYNCH__YOUTUBE__CLIENT_ID: ${YT_SYNCH__YOUTUBE__CLIENT_ID}
# YT_SYNCH__YOUTUBE__CLIENT_SECRET: ${YT_SYNCH__YOUTUBE__CLIENT_SECRET}
# YT_SYNCH__AWS__ENDPOINT: http://host.docker.internal:4566
# YT_SYNCH__AWS__CREDENTIALS__ACCESS_KEY_ID: ${YT_SYNCH__AWS__CREDENTIALS__ACCESS_KEY_ID}
# YT_SYNCH__AWS__CREDENTIALS__SECRET_ACCESS_KEY: ${YT_SYNCH__AWS__CREDENTIALS__SECRET_ACCESS_KEY}
# YT_SYNCH__JOYSTREAM__CHANNEL_COLLABORATOR__ACCOUNT: ${YT_SYNCH__JOYSTREAM__CHANNEL_COLLABORATOR__ACCOUNT}
# YT_SYNCH__JOYSTREAM__CHANNEL_COLLABORATOR__MEMBER_ID: ${YT_SYNCH__JOYSTREAM__CHANNEL_COLLABORATOR__MEMBER_ID}
# YT_SYNCH__JOYSTREAM__APP__NAME: ${YT_SYNCH__JOYSTREAM__APP__NAME}
# YT_SYNCH__JOYSTREAM__APP__ACCOUNT_SEED: ${YT_SYNCH__JOYSTREAM__APP__ACCOUNT_SEED}
# YT_SYNCH__JOYSTREAM__FAUCET__ENDPOINT: ${YT_SYNCH__JOYSTREAM__FAUCET__ENDPOINT}
# YT_SYNCH__JOYSTREAM__FAUCET__CAPTCHA_BYPASS_KEY: ${YT_SYNCH__JOYSTREAM__FAUCET__CAPTCHA_BYPASS_KEY}
OTEL_EXPORTER_OTLP_ENDPOINT: ${TELEMETRY_ENDPOINT}
ports:
- 127.0.0.1:${YT_SYNCH__HTTP_API__PORT}:${YT_SYNCH__HTTP_API__PORT}
networks:
- youtube-synch
- ip6net
command: ['./scripts/start-youtube-synch.sh', '--service', 'httpApi']
youtube-synch_sync:
image: youtube-synch:${IMAGE_TAG}
container_name: youtube-synch_sync
restart: on-failure
depends_on:
- redis
build:
context: .
dockerfile: Dockerfile
volumes:
# Docker socket mounting is required to restart the socks5 proxy container from inside this container
- /var/run/docker.sock:/var/run/docker.sock
- ./local/logs:/youtube-synch/local/logs
- ./local/data:/youtube-synch/local/data
# mount Google Cloud's Application Default Credentials file. A default bind mount is created
# as workaround for scenario when `YT_SYNCH__YOUTUBE__ADC_KEY_FILE_PATH` will be undefined,
# since docker-compose does not support creating bind-mount volume with empty path.
- ${YT_SYNCH__YOUTUBE__ADC_KEY_FILE_PATH:-./package.json}:${YT_SYNCH__YOUTUBE__ADC_KEY_FILE_PATH:-/package.json}:ro
# mount the AWS credentials file to docker container home directory
- ~/.aws/:/root/.aws:ro
env_file:
# relative to working directory where docker-compose was run from
- .env
environment:
DEPLOYMENT_ENV: ${DEPLOYMENT_ENV}
# YT_SYNCH__LOGS__ELASTIC: "{\"level\":\"debug\",\"endpoint\":\"http://elasticsearch:9200\"}"
# YT_SYNCH__ENDPOINTS__QUERY_NODE: ${YT_SYNCH__ENDPOINTS__QUERY_NODE}
# YT_SYNCH__ENDPOINTS__JOYSTREAM_NODE_WS: ${YT_SYNCH__ENDPOINTS__JOYSTREAM_NODE_WS}
YT_SYNCH__ENDPOINTS__REDIS__HOST: redis
YT_SYNCH__ENDPOINTS__REDIS__PORT: ${YT_SYNCH__ENDPOINTS__REDIS__PORT}
# YT_SYNCH__HTTP_API__PORT: ${YT_SYNCH__HTTP_API__PORT}
# YT_SYNCH__HTTP_API__OWNER_KEY: ${YT_SYNCH__HTTP_API__OWNER_KEY}
# YT_SYNCH__YOUTUBE__CLIENT_ID: ${YT_SYNCH__YOUTUBE__CLIENT_ID}
# YT_SYNCH__YOUTUBE__CLIENT_SECRET: ${YT_SYNCH__YOUTUBE__CLIENT_SECRET}
# YT_SYNCH__AWS__ENDPOINT: http://host.docker.internal:4566
# YT_SYNCH__AWS__CREDENTIALS__ACCESS_KEY_ID: ${YT_SYNCH__AWS__CREDENTIALS__ACCESS_KEY_ID}
# YT_SYNCH__AWS__CREDENTIALS__SECRET_ACCESS_KEY: ${YT_SYNCH__AWS__CREDENTIALS__SECRET_ACCESS_KEY}
# YT_SYNCH__JOYSTREAM__CHANNEL_COLLABORATOR__ACCOUNT: ${YT_SYNCH__JOYSTREAM__CHANNEL_COLLABORATOR__ACCOUNT}
# YT_SYNCH__JOYSTREAM__CHANNEL_COLLABORATOR__MEMBER_ID: ${YT_SYNCH__JOYSTREAM__CHANNEL_COLLABORATOR__MEMBER_ID}
# YT_SYNCH__JOYSTREAM__APP__NAME: ${YT_SYNCH__JOYSTREAM__APP__NAME}
# YT_SYNCH__JOYSTREAM__APP__ACCOUNT_SEED: ${YT_SYNCH__JOYSTREAM__APP__ACCOUNT_SEED}
# YT_SYNCH__JOYSTREAM__FAUCET__ENDPOINT: ${YT_SYNCH__JOYSTREAM__FAUCET__ENDPOINT}
# YT_SYNCH__JOYSTREAM__FAUCET__CAPTCHA_BYPASS_KEY: ${YT_SYNCH__JOYSTREAM__FAUCET__CAPTCHA_BYPASS_KEY}
networks:
- youtube-synch
- ip6net
command: ['./bin/run', 'start', '--service', 'sync']
redis:
image: redis:7.2.1
container_name: redis
command: ['redis-server', '--maxmemory-policy', 'noeviction']
ports:
- 127.0.0.1:${YT_SYNCH__ENDPOINTS__REDIS__PORT}:${YT_SYNCH__ENDPOINTS__REDIS__PORT}
networks:
- youtube-synch
volumes:
- redis-data:/data
# ipv6-assigner:
# image: node:18
# container_name: ipv6-assigner
# working_dir: /ipv6-assigner
# env_file:
# # relative to working directory where docker-compose was run from
# - .env
# volumes:
# - .:/ipv6-assigner
# - ~/.aws/:/root/.aws:ro
# restart: on-failure
# command: sh -c "npx ts-node src/utils/assignIpv6Adress.ts"
volumes:
logs:
driver: local
data:
driver: local
redis-data:
driver: local
networks:
youtube-synch:
name: youtube-synch
ip6net:
enable_ipv6: true
ipam:
config:
- subnet: 2001:db8::/64