diff --git a/config.yaml.example b/config.yml.example similarity index 86% rename from config.yaml.example rename to config.yml.example index b369a90..44b1470 100644 --- a/config.yaml.example +++ b/config.yml.example @@ -1,4 +1,4 @@ -ACTOR_PEM: /actor.pem +ACTOR_PEM: /var/lib/relay/actor.pem REDIS_URL: redis://redis:6379 RELAY_BIND: 0.0.0.0:8080 diff --git a/docker-compose.yml b/docker-compose.yml index 0eec641..458016f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,35 +11,25 @@ services: worker: build: . image: yukimochi/activity-relay + working_dir: /var/lib/relay restart: always init: true command: relay worker - environment: - - "ACTOR_PEM=/actor.pem" - - "RELAY_DOMAIN=relay.toot.yukimochi.jp" - - "RELAY_SERVICENAME=YUKIMOCHI Toot Relay Service" - - "RELAY_BIND=0.0.0.0:8080" - - "REDIS_URL=redis://redis:6379" volumes: - - "./actor.pem:/actor.pem" - # - "./config.yaml:/Activity-Relay/config.yaml" + - "./actor.pem:/var/lib/relay/actor.pem" + - "./config.yml:/var/lib/relay/config.yml" depends_on: - redis server: build: . image: yukimochi/activity-relay + working_dir: /var/lib/relay restart: always init: true command: relay server - environment: - - "ACTOR_PEM=/actor.pem" - - "RELAY_DOMAIN=relay.toot.yukimochi.jp" - - "RELAY_SERVICENAME=YUKIMOCHI Toot Relay Service" - - "RELAY_BIND=0.0.0.0:8080" - - "REDIS_URL=redis://redis:6379" volumes: - - "./actor.pem:/actor.pem" - # - "./config.yaml:/Activity-Relay/config.yaml" + - "./actor.pem:/var/lib/relay/actor.pem" + - "./config.yml:/var/lib/relay/config.yml" depends_on: - redis diff --git a/misc/dist/init/relay-api.service b/misc/dist/init/relay-api.service index 8dff587..4655a73 100644 --- a/misc/dist/init/relay-api.service +++ b/misc/dist/init/relay-api.service @@ -14,7 +14,7 @@ Requires=network-online.target Type=simple User=relay Group=relay -ExecStart=/usr/bin/relay --config /var/lib/relay/config.yaml server +ExecStart=/usr/bin/relay --config /var/lib/relay/config.yml server TimeoutStopSec=5s LimitNOFILE=1048576 LimitNPROC=512 diff --git a/misc/dist/init/relay-worker.service b/misc/dist/init/relay-worker.service index 8fb98f9..f4e8ca0 100644 --- a/misc/dist/init/relay-worker.service +++ b/misc/dist/init/relay-worker.service @@ -14,7 +14,7 @@ Requires=network-online.target Type=simple User=relay Group=relay -ExecStart=/usr/bin/relay --config /var/lib/relay/config.yaml worker +ExecStart=/usr/bin/relay --config /var/lib/relay/config.yml worker TimeoutStopSec=5s LimitNOFILE=1048576 LimitNPROC=512 diff --git a/readme.md b/readme.md index e6e5edf..883cff1 100644 --- a/readme.md +++ b/readme.md @@ -45,7 +45,7 @@ relay -c control ### YAML Format ```yaml config.yml -ACTOR_PEM: /actor.pem +ACTOR_PEM: /var/lib/relay/actor.pem REDIS_URL: redis://redis:6379 RELAY_BIND: 0.0.0.0:8080 @@ -60,7 +60,7 @@ JOB_CONCURRENCY: 50 ### Environment Variable - This is **Optional** : When `config.yaml` not exists, use environment variable. + This is **Optional** : When `config.yml` not exists, use environment variable. - ACTOR_PEM - REDIS_URL