create aliases to containers

step 1 towards working federation
This commit is contained in:
Luna 2022-11-17 12:21:21 -03:00
parent 2cb4f80e6c
commit b8eb5119da

View file

@ -3,8 +3,6 @@ services:
pleroma_db: pleroma_db:
image: postgres:15 image: postgres:15
networks:
- pleroma_internal_network
healthcheck: healthcheck:
test: ['CMD', 'pg_isready', '-U', 'postgres'] test: ['CMD', 'pg_isready', '-U', 'postgres']
volumes: volumes:
@ -20,8 +18,9 @@ services:
pleroma_web: pleroma_web:
image: pleroma_selfbuilt image: pleroma_selfbuilt
networks: networks:
- pleroma_internal_network default:
- pleroma_external_network aliases:
- pleroma.pubtester.local
healthcheck: healthcheck:
test: test:
[ [
@ -59,8 +58,6 @@ services:
mastodon_db: mastodon_db:
image: postgres:15 image: postgres:15
shm_size: 256mb shm_size: 256mb
networks:
- internal_network
healthcheck: healthcheck:
test: ['CMD', 'pg_isready', '-U', 'postgres'] test: ['CMD', 'pg_isready', '-U', 'postgres']
volumes: volumes:
@ -73,8 +70,6 @@ services:
mastodon_redis: mastodon_redis:
restart: always restart: always
image: redis:7-alpine image: redis:7-alpine
networks:
- internal_network
healthcheck: healthcheck:
test: ['CMD', 'redis-cli', 'ping'] test: ['CMD', 'redis-cli', 'ping']
volumes: volumes:
@ -85,8 +80,10 @@ services:
env_file: .env.mastodon env_file: .env.mastodon
command: bash -c "rm -f /mastodon/tmp/pids/server.pid; bundle exec rails s -p 3000" command: bash -c "rm -f /mastodon/tmp/pids/server.pid; bundle exec rails s -p 3000"
networks: networks:
- external_network default:
- internal_network aliases:
- mastodon.pubtester.local
healthcheck: healthcheck:
# prettier-ignore # prettier-ignore
test: ['CMD-SHELL', 'wget -q --spider --proxy=off localhost:3000/health || exit 1'] test: ['CMD-SHELL', 'wget -q --spider --proxy=off localhost:3000/health || exit 1']
@ -102,9 +99,6 @@ services:
restart: always restart: always
env_file: .env.mastodon env_file: .env.mastodon
command: node ./streaming command: node ./streaming
networks:
- external_network
- internal_network
healthcheck: healthcheck:
# prettier-ignore # prettier-ignore
test: ['CMD-SHELL', 'wget -q --spider --proxy=off localhost:4000/api/v1/streaming/health || exit 1'] test: ['CMD-SHELL', 'wget -q --spider --proxy=off localhost:4000/api/v1/streaming/health || exit 1']
@ -121,9 +115,6 @@ services:
depends_on: depends_on:
- mastodon_db - mastodon_db
- mastodon_redis - mastodon_redis
networks:
- external_network
- internal_network
volumes: volumes:
- ./data/mastodon/public/system:/mastodon/public/system - ./data/mastodon/public/system:/mastodon/public/system
healthcheck: healthcheck:
@ -132,11 +123,6 @@ services:
# nginx reverse proxy configured for all instances # nginx reverse proxy configured for all instances
nginx: nginx:
image: nginx:1.23.1-alpine image: nginx:1.23.1-alpine
networks:
- external_network
- internal_network
- pleroma_external_network
- pleroma_internal_network
volumes: volumes:
- ./files/nginx.conf:/etc/nginx/nginx.conf:ro - ./files/nginx.conf:/etc/nginx/nginx.conf:ro
ports: ports:
@ -145,11 +131,3 @@ services:
- mastodon_web - mastodon_web
- mastodon_streaming - mastodon_streaming
- pleroma_web - pleroma_web
networks:
external_network:
internal_network:
internal: true
pleroma_external_network:
pleroma_internal_network:
internal: true