mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-06-14 11:29:22 +00:00
Trying to get masto working
This commit is contained in:
parent
497564359b
commit
6afe018d62
20
docker/mastodon/.env.production
Normal file
20
docker/mastodon/.env.production
Normal file
|
@ -0,0 +1,20 @@
|
|||
LOCAL_DOMAIN=127.0.0.1
|
||||
SINGLE_USER_MODE=true
|
||||
SECRET_KEY_BASE=361495a055b7c11d465bfe5bf4bb224c983a4206a9f858612bea58f713b870f62b356141c8e67667a9767b06f60a8df4ff94cdb560f4228c8498092521f24938
|
||||
OTP_SECRET=39ce9d344087cadda49fe58aace8fcfd295e3664aeb0ddc38d1658f03880c09fe21c9603ed990e880c3d2bf1092117417d12d0b1b3ddd2992a404ce5c1947df3
|
||||
VAPID_PRIVATE_KEY=UdtjNxks9IONaA4pMwDi7MV77Qh4fvfzvVRRTuvooI0=
|
||||
VAPID_PUBLIC_KEY=BMrD_ve8TacoxNlM83F3TPfrhcsSeMn-Z8rplUsBPVn-hs3R58E8CVrfTi68pEBTRJuNyrXjZyfhi87EZtqbljA=
|
||||
DB_HOST=db
|
||||
DB_PORT=5432
|
||||
DB_NAME=postgres
|
||||
DB_USER=postgres
|
||||
DB_PASS=password
|
||||
REDIS_HOST=redis
|
||||
REDIS_PORT=6379
|
||||
REDIS_PASSWORD=
|
||||
SMTP_SERVER=localhost
|
||||
SMTP_PORT=25
|
||||
SMTP_AUTH_METHOD=none
|
||||
SMTP_OPENSSL_VERIFY_MODE=none
|
||||
SMTP_FROM_ADDRESS='Mastodon <notifications@127.0.0.1>'
|
||||
LOCAL_HTTPS=false
|
3
docker/mastodon/.gitignore
vendored
Normal file
3
docker/mastodon/.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
public
|
||||
redis
|
||||
postgres
|
119
docker/mastodon/docker-compose.yml
Normal file
119
docker/mastodon/docker-compose.yml
Normal file
|
@ -0,0 +1,119 @@
|
|||
version: '3'
|
||||
services:
|
||||
|
||||
db:
|
||||
restart: always
|
||||
image: postgres:9.6-alpine
|
||||
environment:
|
||||
POSTGRES_PASSWORD: password
|
||||
POSTGRES_DB: postgres
|
||||
POSTGRES_USER: postgres
|
||||
shm_size: 256mb
|
||||
networks:
|
||||
- internal_network
|
||||
healthcheck:
|
||||
test: ["CMD", "pg_isready", "-U", "postgres"]
|
||||
volumes:
|
||||
- ./postgres:/var/lib/postgresql/data
|
||||
|
||||
redis:
|
||||
restart: always
|
||||
image: redis:6.0-alpine
|
||||
networks:
|
||||
- internal_network
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
volumes:
|
||||
- ./redis:/data
|
||||
|
||||
# es:
|
||||
# restart: always
|
||||
# image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.8.10
|
||||
# environment:
|
||||
# - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
|
||||
# - "cluster.name=es-mastodon"
|
||||
# - "discovery.type=single-node"
|
||||
# - "bootstrap.memory_lock=true"
|
||||
# networks:
|
||||
# - internal_network
|
||||
# healthcheck:
|
||||
# test: ["CMD-SHELL", "curl --silent --fail localhost:9200/_cluster/health || exit 1"]
|
||||
# volumes:
|
||||
# - ./elasticsearch:/usr/share/elasticsearch/data
|
||||
# ulimits:
|
||||
# memlock:
|
||||
# soft: -1
|
||||
# hard: -1
|
||||
|
||||
web:
|
||||
# build: .
|
||||
image: tootsuite/mastodon:v3.3.0
|
||||
restart: always
|
||||
env_file: .env.production
|
||||
command: bash -c "rm -f /mastodon/tmp/pids/server.pid; bundle exec rails s -p 3000"
|
||||
networks:
|
||||
- external_network
|
||||
- internal_network
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "wget -q --spider --proxy=off localhost:3000/health || exit 1"]
|
||||
ports:
|
||||
- "3000:3000"
|
||||
depends_on:
|
||||
- db
|
||||
- redis
|
||||
# - es
|
||||
volumes:
|
||||
- ./public/system:/mastodon/public/system
|
||||
|
||||
streaming:
|
||||
# build: .
|
||||
image: tootsuite/mastodon:v3.3.0
|
||||
restart: always
|
||||
env_file: .env.production
|
||||
command: node ./streaming
|
||||
networks:
|
||||
- external_network
|
||||
- internal_network
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "wget -q --spider --proxy=off localhost:4000/api/v1/streaming/health || exit 1"]
|
||||
ports:
|
||||
- "127.0.0.1:4000:4000"
|
||||
depends_on:
|
||||
- db
|
||||
- redis
|
||||
|
||||
sidekiq:
|
||||
# build: .
|
||||
image: tootsuite/mastodon:v3.3.0
|
||||
restart: always
|
||||
env_file: .env.production
|
||||
command: bundle exec sidekiq
|
||||
depends_on:
|
||||
- db
|
||||
- redis
|
||||
networks:
|
||||
- external_network
|
||||
- internal_network
|
||||
volumes:
|
||||
- ./public/system:/mastodon/public/system
|
||||
## Uncomment to enable federation with tor instances along with adding the following ENV variables
|
||||
## http_proxy=http://privoxy:8118
|
||||
## ALLOW_ACCESS_TO_HIDDEN_SERVICE=true
|
||||
# tor:
|
||||
# image: sirboops/tor
|
||||
# networks:
|
||||
# - external_network
|
||||
# - internal_network
|
||||
#
|
||||
# privoxy:
|
||||
# image: sirboops/privoxy
|
||||
# volumes:
|
||||
# - ./priv-config:/opt/config
|
||||
# networks:
|
||||
# - external_network
|
||||
# - internal_network
|
||||
|
||||
networks:
|
||||
external_network:
|
||||
internal_network:
|
||||
internal: true
|
12
docker/mastodon/run-mastodon.sh
Executable file
12
docker/mastodon/run-mastodon.sh
Executable file
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash
|
||||
|
||||
# For the dialogs, everything is default except:
|
||||
|
||||
# Use 127.0.0.1 for domain
|
||||
# Use "password" for db password
|
||||
# Use local email, don't test
|
||||
|
||||
docker-compose build
|
||||
sudo chown -R 991:991 public
|
||||
docker-compose run --rm web bundle exec rake mastodon:setup
|
||||
docker-compose up
|
Loading…
Reference in a new issue