Browse Source

fix compose names, add example with hashtag

Umputun 5 years ago
parent
commit
dc55052b0f
3 changed files with 7 additions and 6 deletions
  1. 1 2
      Dockerfile
  2. 1 1
      app/main.go
  3. 5 3
      docker-compose.yml

+ 1 - 2
Dockerfile

@@ -31,8 +31,7 @@ RUN mkdir -p target && /script/coverage.sh
 # submit coverage to coverals if COVERALLS_TOKEN in env
 RUN if [ -z "$COVERALLS_TOKEN" ] ; then \
     echo "coverall not enabled" ; \
-    else goveralls -coverprofile=.cover/cover.out -service=travis-ci -repotoken $COVERALLS_TOKEN || echo "coverall failed!"; fi && \
-    cat .cover/cover.out
+    else goveralls -coverprofile=.cover/cover.out -service=travis-ci -repotoken $COVERALLS_TOKEN || echo "coverall failed!"; fi
 
 RUN \
     if [ -z "$TRAVIS" ] ; then \

+ 1 - 1
app/main.go

@@ -54,7 +54,7 @@ func main() {
 		log.Print("[INFO] dry mode")
 	}
 
-	log.Printf("[INFO] message template %q", opts.Template)
+	log.Printf("[INFO] message template - %q", opts.Template)
 
 	for event := range notifier.Go(context.Background()) {
 		err := pub.Publish(event, func(r rss.Event) string {

+ 5 - 3
docker-compose.yml

@@ -3,9 +3,9 @@ version: '2'
 services:
 
   rss2twitter:
-    image: umputun/rss2twitter:latest
-    container_name: nginx
-    hostname: nginx
+    image: rss2twitter:latest
+    container_name: rss2twitter
+    hostname: rss2twitter
     restart: always
 
     logging: &default_logging
@@ -21,3 +21,5 @@ services:
       - TWI_CONSUMER_SECRET
       - TWI_ACCESS_TOKEN
       - TWI_ACCESS_SECRET
+      - "TEMPLATE={{.Title}} - {{.Link}} #mytag"
+    command: ["/srv/rss2twitter", "--dry"]