Deploy with Docker
Deploying a Yarn.social Pod using Docker is easy.
- Pull the image prologic/yarnd:latest from the Docker Hub.
- Run a new container with some basic configuration.
-
Optionally: Create a
docker-compose.yml
to manage your deployment.
☝️
Note
$ docker pull prologic/yarnd:latest
$ docker run -p 8000:8000 -e NAME=yarn.example.com -e BASE_URL=https://yarn.example.com prologic/yarnd:latest
After you have successfully started the container you should see startup logs similar to the following which also show the configuration of the pod:
Configuring yarnd...Switching UID=1000 and GID=1000
INFO[0000] calibrating scrypt parameters ...
INFO[0002] scrypt params params="{32768 8 7 16 32}"
INFO[0002] started websub processor
INFO[0002] Started background job RotateFeeds (0 0 1 * * 0)
INFO[0002] Started background job PruneFollowers (0 0 2 * * 0)
INFO[0002] Started background job PruneUsers (0 0 3 * * 0)
INFO[0002] Started background job UpdateFeeds (@every 5m)
INFO[0002] Started background job DeleteOldSessions (@hourly)
INFO[0002] Started background job ActiveUsers (@hourly)
INFO[0002] Started background job SyncStore (@every 1m)
INFO[0002] Started background job UpdateFeedSources (@every 15m)
INFO[0002] started background jobs
INFO[0002] started task dispatcher
INFO[0002] started webmentions processor
INFO[0002] serving metrics endpoint at https://mypod.mydomain.tld/metrics
INFO[0002] Debug: false
INFO[0002] Instance Name: yarn.example.com
INFO[0002] Base URL: https://yarn.example.com
INFO[0002] Using Theme:
INFO[0002] Admin User: admin
INFO[0002] Admin Name: Administrator
INFO[0002] Admin Email: [email protected]
INFO[0002] Max Twts per Page: 50
INFO[0002] Max Cache TTL: 336h0m0s
INFO[0002] Fetch Interval: @every 5m
INFO[0002] Max Cache Items: 150
INFO[0002] Maximum length of Posts: 1024
INFO[0002] Open User Profiles: true
INFO[0002] Open Registrations: true
INFO[0002] Disable Gzip: false
INFO[0002] Disable Logger: false
INFO[0002] Disable Media: false
INFO[0002] Disable FFMpeg: false
INFO[0002] Disable Archive: false
INFO[0002] SMTP Host: INVALID CONFIG VALUE - PLEASE CHANGE THIS VALUE
INFO[0002] SMTP Port: 0
INFO[0002] SMTP User: INVALID CONFIG VALUE - PLEASE CHANGE THIS VALUE
INFO[0002] SMTP From: INVALID CONFIG VALUE - PLEASE CHANGE THIS VALUE
INFO[0002] Max Fetch Limit: 1.0 MB
INFO[0002] Max Upload Size: 17 MB
INFO[0002] API Session Time: 240h0m0s
INFO[0002] Enabled Features:
INFO[0002] yarnd v0.15.1@1f6f3696 listening on 0.0.0.0:8000
INFO[0002] updating active user stats
WARN[0002] No TLS configured
INFO[0007] running startup jobs
INFO[0007] running RotateFeeds now...
INFO[0007] running UpdateFeeds now...
INFO[0007] updating feeds for 0 users and 0 feeds
INFO[0007] updating 2 sources
At this point your pod is ready to use, however it is important at this point that you configure an appropriate reverse proxy or load balancer in front of the container. The example above has the container listening on port 8000
exposed to the host. A reverse proxy configuration must be setup to route traffic for https://mypod.mydomain.tld to 127.0.0.1:3000
or whatever the container's IP address is that is reachable by the reverse proxy.
☝️
Important
For other deployment methods, please refer to the Installation documentation.