finish docker-compose file
This commit is contained in:
parent
43d2ea6c01
commit
a424783a71
|
@ -5,10 +5,10 @@ services:
|
||||||
context: .
|
context: .
|
||||||
image: "horhik/instagram2fedi:latest"
|
image: "horhik/instagram2fedi:latest"
|
||||||
environment:
|
environment:
|
||||||
- YOUR_CONTAINER_NAME=innubis_crossposter
|
- YOUR_CONTAINER_NAME=<whatever>
|
||||||
- I2M_INSTAGRAM_USER=innubis
|
- I2M_INSTAGRAM_USER=<instgram username>
|
||||||
- I2M_INSTANCE=mastodon.ml
|
- I2M_INSTANCE=<mastodon or pixelfed instance>
|
||||||
- I2M_TOKEN=y-Sz4sICYGwEkTI5UJz2U-58hvjGXec61YSLo2zascQ
|
- I2M_TOKEN=<your token here>
|
||||||
- I2M_CHECK_INTERVAL=3600 #1 hour
|
- I2M_CHECK_INTERVAL=3600 #1 hour
|
||||||
- I2M_POST_INTERVAL=3600 #1 hour
|
- I2M_POST_INTERVAL=3600 #1 hour
|
||||||
- I2M_USE_MASTODON=4 #max carouse - is 4, if there's no limit set to -1
|
- I2M_USE_MASTODON=4 #max carouse - is 4, if there's no limit set to -1
|
||||||
|
|
|
@ -19,31 +19,21 @@ print(post_interval)
|
||||||
print(use_mastodon)
|
print(use_mastodon)
|
||||||
print(fetch_count)
|
print(fetch_count)
|
||||||
|
|
||||||
|
def exists(a):
|
||||||
|
return a != '' and a != False
|
||||||
|
|
||||||
|
|
||||||
def process_arguments(args, defaults):
|
def process_arguments(args, defaults):
|
||||||
if(instance):
|
defaults["instance"] = instance if instance !='' and instance else None
|
||||||
defaults["instance"] = instance
|
defaults["instagram-user"] = instagram_user if instagram_user != '' and instagram_user else None
|
||||||
elif (instagram_user):
|
defaults["token"] = token if token != '' and token else None
|
||||||
defaults["instagram-user"] = instagram_user
|
defaults["check-interval"] = int(check_interval) if check_interval != '' and check_interval else None
|
||||||
elif (token):
|
defaults["post-interval"] = int(post_interval) if post_interval != '' and post_interval else None
|
||||||
defaults["token"] = token
|
defaults["fetch-count"] = int(fetch_count) if fetch_count != '' and fetch_count else None
|
||||||
|
defaults["carousel-limit"] = int(use_mastodon) if use_mastodon != '' and use_mastodon else None
|
||||||
elif (check_interval):
|
#print(Fore.RED + '❗ -> Missing Argument ')
|
||||||
defaults["check-interval"] = check_interval
|
#print(Style.RESET_ALL)
|
||||||
|
#print(datetime.datetime.now())
|
||||||
elif (post_interval):
|
print(defaults)
|
||||||
defaults["post-interval"] = post_interval
|
|
||||||
|
|
||||||
elif (fetch_count):
|
|
||||||
defaults["fetch-count"] = fetch_count
|
|
||||||
|
|
||||||
elif (use_mastodon):
|
|
||||||
defaults["carousel-limit"] = use_mastodon
|
|
||||||
else:
|
|
||||||
print(Fore.RED + '❗ -> Missing Argument ')
|
|
||||||
print(Style.RESET_ALL)
|
|
||||||
print(datetime.datetime.now())
|
|
||||||
return defaults
|
return defaults
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ default_settings = {
|
||||||
|
|
||||||
settings = process_arguments(sys.argv, default_settings)
|
settings = process_arguments(sys.argv, default_settings)
|
||||||
|
|
||||||
print('FINAL SETTINGS' , settings)
|
print('FAIL ♂ SETTINGS' , settings)
|
||||||
|
|
||||||
agree = [1, True, "true", "True", "yes", "Yes"]
|
agree = [1, True, "true", "True", "yes", "Yes"]
|
||||||
if (os.environ.get("USE_DOCKER")):
|
if (os.environ.get("USE_DOCKER")):
|
||||||
|
|
Loading…
Reference in New Issue