Fix config.yaml to config.yml. Improve docker-compose.yml.

This commit is contained in:
Naoki Kosaka 2021-06-21 09:56:37 +09:00
parent 4a9f05626b
commit 7242e75647
5 changed files with 11 additions and 21 deletions

View File

@ -1,4 +1,4 @@
ACTOR_PEM: /actor.pem ACTOR_PEM: /var/lib/relay/actor.pem
REDIS_URL: redis://redis:6379 REDIS_URL: redis://redis:6379
RELAY_BIND: 0.0.0.0:8080 RELAY_BIND: 0.0.0.0:8080

View File

@ -11,35 +11,25 @@ services:
worker: worker:
build: . build: .
image: yukimochi/activity-relay image: yukimochi/activity-relay
working_dir: /var/lib/relay
restart: always restart: always
init: true init: true
command: relay worker 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: volumes:
- "./actor.pem:/actor.pem" - "./actor.pem:/var/lib/relay/actor.pem"
# - "./config.yaml:/Activity-Relay/config.yaml" - "./config.yml:/var/lib/relay/config.yml"
depends_on: depends_on:
- redis - redis
server: server:
build: . build: .
image: yukimochi/activity-relay image: yukimochi/activity-relay
working_dir: /var/lib/relay
restart: always restart: always
init: true init: true
command: relay server 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: volumes:
- "./actor.pem:/actor.pem" - "./actor.pem:/var/lib/relay/actor.pem"
# - "./config.yaml:/Activity-Relay/config.yaml" - "./config.yml:/var/lib/relay/config.yml"
depends_on: depends_on:
- redis - redis

View File

@ -14,7 +14,7 @@ Requires=network-online.target
Type=simple Type=simple
User=relay User=relay
Group=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 TimeoutStopSec=5s
LimitNOFILE=1048576 LimitNOFILE=1048576
LimitNPROC=512 LimitNPROC=512

View File

@ -14,7 +14,7 @@ Requires=network-online.target
Type=simple Type=simple
User=relay User=relay
Group=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 TimeoutStopSec=5s
LimitNOFILE=1048576 LimitNOFILE=1048576
LimitNPROC=512 LimitNPROC=512

View File

@ -45,7 +45,7 @@ relay -c <Path of config file> control
### YAML Format ### YAML Format
```yaml config.yml ```yaml config.yml
ACTOR_PEM: /actor.pem ACTOR_PEM: /var/lib/relay/actor.pem
REDIS_URL: redis://redis:6379 REDIS_URL: redis://redis:6379
RELAY_BIND: 0.0.0.0:8080 RELAY_BIND: 0.0.0.0:8080
@ -60,7 +60,7 @@ JOB_CONCURRENCY: 50
### Environment Variable ### 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 - ACTOR_PEM
- REDIS_URL - REDIS_URL