Update file structure.

This commit is contained in:
Sunoru 2024-03-23 03:21:39 +00:00
parent 215329b01a
commit 6eb231df35
No known key found for this signature in database
GPG key ID: 4F279F385559D05D
4 changed files with 23 additions and 24 deletions

6
.gitignore vendored
View file

@ -1,7 +1,3 @@
.env*
/postgres
/redis
/backups
/nginx/*
!/nginx/conf.d
/data
/tmp

View file

@ -1,10 +1,16 @@
FROM tootsuite/mastodon:v4.1.4
FROM ghcr.io/mastodon/mastodon:v4.2.8
USER root
RUN mkdir -p /var/cache/apt/archives/partial && apt autoclean
RUN apt update && apt-get install -y sudo vim htop git curl && rm -rf /var/lib/apt/lists/*
# Restore working dir
# USER mastodon
WORKDIR /opt/mastodon
VOLUME [ "/opt/my-mastodon" ]
RUN \
cp -r /opt/mastodon /opt/my-mastodon; \
ln -s /opt/my-mastodon /my-mastodon
WORKDIR /opt/my-mastodon
# bundle exec rails assets:precompile

View file

@ -11,7 +11,7 @@ services:
healthcheck:
test: ['CMD', 'pg_isready', '-U', 'postgres']
volumes:
- ./postgres:/var/lib/postgresql/data
- ./data/postgres:/var/lib/postgresql/data
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
@ -24,7 +24,7 @@ services:
healthcheck:
test: ['CMD', 'redis-cli', 'ping']
volumes:
- ./redis:/data
- ./data/redis:/data
web:
container_name: mastodon-web
@ -39,14 +39,11 @@ services:
test:
- CMD-SHELL
- wget -q --spider --proxy=off localhost:3000/health || exit 1
# ports:
# - 127.0.0.1:3000:3000
depends_on:
- db
- redis
volumes:
- ./mastodon:/mastodon
# - ./mastodon/public:/mastodon/public
- ./mastodon:/my-mastodon
streaming:
container_name: mastodon-streaming
@ -54,8 +51,6 @@ services:
restart: always
env_file: .env.production
command: node ./streaming
# ports:
# - 127.0.0.1:4000:4000
depends_on:
- db
- redis
@ -66,6 +61,8 @@ services:
test:
- CMD-SHELL
- wget -q --spider --proxy=off localhost:4000/api/v1/streaming/health || exit 1
volumes:
- ./mastodon:/my-mastodon
sidekiq:
container_name: mastodon-sidekiq
@ -84,13 +81,14 @@ services:
- CMD-SHELL
- ps aux | grep '[s]idekiq 6' || false
volumes:
- ./mastodon:/mastodon
# - ./mastodon/public:/mastodon/public
- ./mastodon:/my-mastodon
nginx:
container_name: mastodon-nginx
restart: always
image: nginx:latest
depends_on:
- web
networks:
- external_network
- internal_network
@ -99,10 +97,9 @@ services:
- 127.0.0.1:3001:80
# - 127.0.0.1:3002:443
volumes:
- ./mastodon:/mastodon
# - ./mastodon/public:/mastodon/public
- ./nginx/cache:/var/cache/nginx
- ./mastodon/public:/mastodon/public
- ./nginx/conf.d:/etc/nginx/conf.d
- ./data/nginx-cache:/var/cache/nginx
duplicity:
container_name: mastodon-duplicity
@ -114,7 +111,7 @@ services:
- internal_network
- external_network
volumes:
- ./redis:/mnt/redis:ro
- ./data/redis:/mnt/redis:ro
networks:
external_network:

@ -1 +1 @@
Subproject commit 4633bb8ce09f216170c3f8370a8e48f3a41872cb
Subproject commit 47c6f5edc3f931d2271d4ca353e1666b10b32acd