pubtester/docker-compose.yaml

179 lines
5.1 KiB
YAML
Raw Normal View History

2022-11-16 00:02:40 +00:00
version: "3.9"
services:
2022-11-17 02:22:33 +00:00
pleroma_db:
image: postgres:15
healthcheck:
test: ['CMD', 'pg_isready', '-U', 'postgres']
volumes:
- ./data/pleroma/postgres15:/var/lib/postgresql/data
2022-11-17 02:22:33 +00:00
environment:
- 'POSTGRES_HOST_AUTH_METHOD=trust'
- 'POSTGRES_USER=pleroma'
- 'POSTGRES_PASSWORD=very_secure_pleroma_password'
- 'POSTGRES_DB=pleroma'
2022-11-16 21:08:17 +00:00
2022-11-17 02:22:33 +00:00
pleroma_web:
image: pleroma_selfbuilt
healthcheck:
test:
[
"CMD-SHELL",
"wget -q --spider --proxy=off localhost:4000 || exit 1",
]
restart: always
ports:
- '127.0.0.1:20700:4000'
build:
context: .
# Feel free to remove or override this section
# See 'Build-time variables' in README.md
args:
- "UID=1000"
- "GID=1000"
- "PLEROMA_VER=v2.4.2"
volumes:
- ./data/pleroma/uploads:/var/lib/pleroma/uploads
- ./data/pleroma/static:/var/lib/pleroma/static
- ./files/pleroma.exs:/etc/pleroma/config.exs:ro
environment:
DOMAIN: pleroma.pubtester.example.net
2022-11-17 02:22:33 +00:00
INSTANCE_NAME: Pleroma/pubtester
ADMIN_EMAIL: admin@example.com
NOTIFY_EMAIL: notify@example.com
DB_HOST: pleroma_db
DB_USER: pleroma
DB_PASS: very_secure_pleroma_password
DB_NAME: pleroma
depends_on:
- pleroma_db
2022-11-18 16:15:04 +00:00
pleroma2_db:
image: postgres:15
healthcheck:
test: ['CMD', 'pg_isready', '-U', 'postgres']
volumes:
- ./data/pleroma2/postgres15:/var/lib/postgresql/data
2022-11-18 16:15:04 +00:00
environment:
- 'POSTGRES_HOST_AUTH_METHOD=trust'
- 'POSTGRES_USER=pleroma'
- 'POSTGRES_PASSWORD=very_secure_pleroma_password'
- 'POSTGRES_DB=pleroma'
pleroma2_web:
# use pleroma_source_selfbuilt if patching pleroma
2022-11-18 16:15:04 +00:00
image: pleroma_selfbuilt
healthcheck:
test:
[
"CMD-SHELL",
"wget -q --spider --proxy=off localhost:4000 || exit 1",
]
restart: always
ports:
- '127.0.0.1:20710:4000'
build:
context: .
args:
- "UID=1000"
- "GID=1000"
- "PLEROMA_VER=v2.4.2"
volumes:
- ./data/pleroma2/uploads:/var/lib/pleroma/uploads
- ./data/pleroma2/static:/var/lib/pleroma/static
- ./files/pleroma.exs:/pleroma/config/prod.secret.exs:ro
# dev patches
#- /home/luna/git/pleroma/lib/pleroma/formatter.ex:/pleroma/lib/pleroma/formatter.ex:ro
#- /home/luna/git/pleroma/deps/linkify/lib/linkify/parser.ex:/pleroma/deps/linkify/lib/linkify/parser.ex:ro
2022-11-18 16:15:04 +00:00
environment:
DOMAIN: pleroma2.pubtester.example.net
2022-11-18 16:15:04 +00:00
INSTANCE_NAME: Pleroma/pubtester2
ADMIN_EMAIL: admin@example.com
NOTIFY_EMAIL: notify@example.com
DB_HOST: pleroma2_db
DB_USER: pleroma
DB_PASS: very_secure_pleroma_password
DB_NAME: pleroma
depends_on:
- pleroma2_db
2022-11-16 21:08:17 +00:00
# mastodon config
2022-11-16 00:02:40 +00:00
mastodon_db:
image: postgres:15
2022-11-16 21:08:17 +00:00
shm_size: 256mb
healthcheck:
test: ['CMD', 'pg_isready', '-U', 'postgres']
volumes:
- ./data/mastodon/postgres14:/var/lib/postgresql/data
environment:
- 'POSTGRES_HOST_AUTH_METHOD=trust'
- 'POSTGRES_USER=mastodon'
- 'POSTGRES_PASSWORD=very_secure_mastodon_password'
- 'POSTGRES_DB=mastodon'
mastodon_redis:
restart: always
image: redis:7-alpine
healthcheck:
test: ['CMD', 'redis-cli', 'ping']
volumes:
- ./data/mastodon/redis:/data
mastodon_web:
2022-11-18 16:15:04 +00:00
image: mastodon_selfbuilt
2022-11-16 21:08:17 +00:00
restart: always
env_file: .env.mastodon
2022-11-18 16:15:04 +00:00
command: bash -c "rm -f /mastodon/tmp/pids/server.pid; bundle exec rails s -p 3000 -b 0.0.0.0"
2022-11-16 21:08:17 +00:00
healthcheck:
# prettier-ignore
test: ['CMD-SHELL', 'wget -q --spider --proxy=off localhost:3000/health || exit 1']
ports:
- '127.0.0.1:20690:3000'
depends_on:
- mastodon_db
- mastodon_redis
volumes:
- ./data/mastodon/public/system:/mastodon/public/system
mastodon_streaming:
2022-11-18 16:15:04 +00:00
image: mastodon_selfbuilt
2022-11-16 21:08:17 +00:00
restart: always
env_file: .env.mastodon
command: node ./streaming
healthcheck:
# prettier-ignore
test: ['CMD-SHELL', 'wget -q --spider --proxy=off localhost:4000/api/v1/streaming/health || exit 1']
ports:
- '127.0.0.1:20691:4000'
depends_on:
- mastodon_db
- mastodon_redis
mastodon_sidekiq:
2022-11-18 16:15:04 +00:00
image: mastodon_selfbuilt
2022-11-16 21:08:17 +00:00
restart: always
env_file: .env.mastodon
command: bundle exec sidekiq
depends_on:
- mastodon_db
- mastodon_redis
volumes:
- ./data/mastodon/public/system:/mastodon/public/system
healthcheck:
test: ['CMD-SHELL', "ps aux | grep '[s]idekiq\ 6' || false"]
# nginx reverse proxy configured for all instances
nginx:
image: nginx:1.23.1-alpine
2022-11-18 16:15:04 +00:00
networks:
default:
aliases:
- pleroma.pubtester.example.net
- pleroma2.pubtester.example.net
2022-11-16 21:08:17 +00:00
volumes:
- ./files/nginx.conf:/etc/nginx/nginx.conf:ro
- ./pubtester.example.net/cert.pem:/etc/nginx/cert.pem:ro
- ./pubtester.example.net/key.pem:/etc/nginx/key.pem:ro
2022-11-16 21:08:17 +00:00
ports:
2022-11-18 16:15:04 +00:00
- '127.0.0.1:20000:443'
2022-11-16 21:08:17 +00:00
depends_on:
2022-11-18 16:15:04 +00:00
#- mastodon_web
#- mastodon_streaming
2022-11-17 02:22:33 +00:00
- pleroma_web
2022-11-18 16:15:04 +00:00
- pleroma2_web