Update file structure.
This commit is contained in:
parent
215329b01a
commit
6eb231df35
4 changed files with 23 additions and 24 deletions
6
.gitignore
vendored
6
.gitignore
vendored
|
@ -1,7 +1,3 @@
|
||||||
.env*
|
.env*
|
||||||
/postgres
|
/data
|
||||||
/redis
|
|
||||||
/backups
|
|
||||||
/nginx/*
|
|
||||||
!/nginx/conf.d
|
|
||||||
/tmp
|
/tmp
|
||||||
|
|
14
Dockerfile
14
Dockerfile
|
@ -1,10 +1,16 @@
|
||||||
FROM tootsuite/mastodon:v4.1.4
|
FROM ghcr.io/mastodon/mastodon:v4.2.8
|
||||||
|
|
||||||
USER root
|
USER root
|
||||||
|
|
||||||
RUN mkdir -p /var/cache/apt/archives/partial && apt autoclean
|
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/*
|
RUN apt update && apt-get install -y sudo vim htop git curl && rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Restore working dir
|
VOLUME [ "/opt/my-mastodon" ]
|
||||||
# USER mastodon
|
|
||||||
WORKDIR /opt/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
|
||||||
|
|
|
@ -11,7 +11,7 @@ services:
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ['CMD', 'pg_isready', '-U', 'postgres']
|
test: ['CMD', 'pg_isready', '-U', 'postgres']
|
||||||
volumes:
|
volumes:
|
||||||
- ./postgres:/var/lib/postgresql/data
|
- ./data/postgres:/var/lib/postgresql/data
|
||||||
environment:
|
environment:
|
||||||
- POSTGRES_HOST_AUTH_METHOD=trust
|
- POSTGRES_HOST_AUTH_METHOD=trust
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ services:
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ['CMD', 'redis-cli', 'ping']
|
test: ['CMD', 'redis-cli', 'ping']
|
||||||
volumes:
|
volumes:
|
||||||
- ./redis:/data
|
- ./data/redis:/data
|
||||||
|
|
||||||
web:
|
web:
|
||||||
container_name: mastodon-web
|
container_name: mastodon-web
|
||||||
|
@ -39,14 +39,11 @@ services:
|
||||||
test:
|
test:
|
||||||
- CMD-SHELL
|
- CMD-SHELL
|
||||||
- wget -q --spider --proxy=off localhost:3000/health || exit 1
|
- wget -q --spider --proxy=off localhost:3000/health || exit 1
|
||||||
# ports:
|
|
||||||
# - 127.0.0.1:3000:3000
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
- redis
|
- redis
|
||||||
volumes:
|
volumes:
|
||||||
- ./mastodon:/mastodon
|
- ./mastodon:/my-mastodon
|
||||||
# - ./mastodon/public:/mastodon/public
|
|
||||||
|
|
||||||
streaming:
|
streaming:
|
||||||
container_name: mastodon-streaming
|
container_name: mastodon-streaming
|
||||||
|
@ -54,8 +51,6 @@ services:
|
||||||
restart: always
|
restart: always
|
||||||
env_file: .env.production
|
env_file: .env.production
|
||||||
command: node ./streaming
|
command: node ./streaming
|
||||||
# ports:
|
|
||||||
# - 127.0.0.1:4000:4000
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
- redis
|
- redis
|
||||||
|
@ -66,6 +61,8 @@ services:
|
||||||
test:
|
test:
|
||||||
- CMD-SHELL
|
- CMD-SHELL
|
||||||
- wget -q --spider --proxy=off localhost:4000/api/v1/streaming/health || exit 1
|
- wget -q --spider --proxy=off localhost:4000/api/v1/streaming/health || exit 1
|
||||||
|
volumes:
|
||||||
|
- ./mastodon:/my-mastodon
|
||||||
|
|
||||||
sidekiq:
|
sidekiq:
|
||||||
container_name: mastodon-sidekiq
|
container_name: mastodon-sidekiq
|
||||||
|
@ -84,13 +81,14 @@ services:
|
||||||
- CMD-SHELL
|
- CMD-SHELL
|
||||||
- ps aux | grep '[s]idekiq 6' || false
|
- ps aux | grep '[s]idekiq 6' || false
|
||||||
volumes:
|
volumes:
|
||||||
- ./mastodon:/mastodon
|
- ./mastodon:/my-mastodon
|
||||||
# - ./mastodon/public:/mastodon/public
|
|
||||||
|
|
||||||
nginx:
|
nginx:
|
||||||
container_name: mastodon-nginx
|
container_name: mastodon-nginx
|
||||||
restart: always
|
restart: always
|
||||||
image: nginx:latest
|
image: nginx:latest
|
||||||
|
depends_on:
|
||||||
|
- web
|
||||||
networks:
|
networks:
|
||||||
- external_network
|
- external_network
|
||||||
- internal_network
|
- internal_network
|
||||||
|
@ -99,10 +97,9 @@ services:
|
||||||
- 127.0.0.1:3001:80
|
- 127.0.0.1:3001:80
|
||||||
# - 127.0.0.1:3002:443
|
# - 127.0.0.1:3002:443
|
||||||
volumes:
|
volumes:
|
||||||
- ./mastodon:/mastodon
|
- ./mastodon/public:/mastodon/public
|
||||||
# - ./mastodon/public:/mastodon/public
|
|
||||||
- ./nginx/cache:/var/cache/nginx
|
|
||||||
- ./nginx/conf.d:/etc/nginx/conf.d
|
- ./nginx/conf.d:/etc/nginx/conf.d
|
||||||
|
- ./data/nginx-cache:/var/cache/nginx
|
||||||
|
|
||||||
duplicity:
|
duplicity:
|
||||||
container_name: mastodon-duplicity
|
container_name: mastodon-duplicity
|
||||||
|
@ -114,7 +111,7 @@ services:
|
||||||
- internal_network
|
- internal_network
|
||||||
- external_network
|
- external_network
|
||||||
volumes:
|
volumes:
|
||||||
- ./redis:/mnt/redis:ro
|
- ./data/redis:/mnt/redis:ro
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
external_network:
|
external_network:
|
||||||
|
|
2
mastodon
2
mastodon
|
@ -1 +1 @@
|
||||||
Subproject commit 4633bb8ce09f216170c3f8370a8e48f3a41872cb
|
Subproject commit 47c6f5edc3f931d2271d4ca353e1666b10b32acd
|
Loading…
Reference in a new issue