Fix config.yaml to config.yml. Improve docker-compose.yml.
This commit is contained in:
parent
4a9f05626b
commit
7242e75647
@ -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
|
@ -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
|
||||||
|
2
misc/dist/init/relay-api.service
vendored
2
misc/dist/init/relay-api.service
vendored
@ -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
|
||||||
|
2
misc/dist/init/relay-worker.service
vendored
2
misc/dist/init/relay-worker.service
vendored
@ -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
|
||||||
|
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user