-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.sample.yml
executable file
·81 lines (73 loc) · 2.38 KB
/
docker-compose.sample.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
version: "3.9"
x-common-variables: &common-variables
SNSCRAPE_TWITTER_USERS: granblue_en,granbluefantasy #comma-separated usernames for Twitter users you want tweets for
SNSCRAPE_DATABASE_DB: twitter # You can leave this alone
SNSCRAPE_DATABASE_HOST: postgres
SNSCRAPE_DATABASE_USERNAME: postgres
SNSCRAPE_DATABASE_PASSWORD: sample_password # Should match POSTGRES_PASSWORD below
SNSCRAPE_MAX_RESULTS: 10
NITTER_ADDRESS: twiiit.com
services:
discord-bot:
image: catfacts/song
restart: always
build:
context: ./song
environment:
<<: *common-variables
DISCORD_TOKEN: # Put in your bot's token here, ie "EXAMPLE.TOKEN"
DISCORD_NEWS_CHANNEL_ID: # Put in the numerical ID for your channel you want the bot to post on (Right-click a channel and click on "copy ID".
DISCORD_COMMAND_PREFIX: "," # Or put in another command prefix if you'd like; this doesn't actually see any use.
TWITTER_BASE_URL: "twitter.com" # You can swap this out with another twitter-parsing service, such as fxtwitter.com or vxtwitter.com
depends_on:
nitter-rss-feed:
condition: service_healthy
nitter-rss-feed:
image: catfacts/nitter-rss-feed
build:
context: ./nitter-rss-feed
restart: always
environment: *common-variables
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD", "/home/song/healthcheck.sh"]
interval: 30s
timeout: 5s
retries: 2
start_period: 10s
#snscrape-scraper:
# image: catfacts/twitter-scraper
# restart: always
# build:
# context: ./scraper
# environment: *common-variables
# depends_on:
# postgres:
# condition: service_healthy
# healthcheck:
# test: ["CMD", "/home/song/healthcheck.sh"]
# interval: 10s
# retries: 5
# start_period: 20s
# timeout: 20s
postgres:
image: postgres:14-alpine
restart: always
user: postgres
environment:
PGUSER: postgres # Shoud match SNSCRAPE_DATABASE_USERNAME above
POSTGRES_PASSWORD: sample_password # should match SNSCRAPE_POSTGRES_PASSWORD above
hostname: postgres # Should match SNSCRAPE_DATABASE_HOST above
volumes:
- pgdata:/var/lib/postgresql/pgdata
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 10s
timeout: 5s
retries: 5
volumes:
pgdata:
networks:
scraper: