fix
This commit is contained in:
parent
7a785b6264
commit
4f28d87293
9
Dockerfile
Normal file
9
Dockerfile
Normal file
@ -0,0 +1,9 @@
|
||||
FROM redis:alpine AS redis-server
|
||||
ADD start-redis-server.sh /usr/bin/
|
||||
RUN chmod +x /usr/bin/start-redis-server.sh
|
||||
CMD ["start-redis-server.sh"]
|
||||
|
||||
FROM tootsuite/mastodon:edge
|
||||
ENV PORT 8080
|
||||
ENV BIND 0.0.0.0
|
||||
ENTRYPOINT []
|
26
README.md
26
README.md
@ -0,0 +1,26 @@
|
||||
# mastodon
|
||||
|
||||
- https://github.com/mastodon/mastodon
|
||||
- https://github.com/mastodon/mastodon/pkgs/container/mastodon
|
||||
- https://hub.docker.com/r/tootsuite/mastodon
|
||||
|
||||
## update
|
||||
|
||||
```sh
|
||||
$ docker compose pull
|
||||
$ docker compose build
|
||||
$ docker compose run --rm mastodon rails db:migrate
|
||||
$ docker compose up -d
|
||||
```
|
||||
|
||||
## db:encryption
|
||||
|
||||
```sh
|
||||
$ docker compose run --rm mastodon rails db:encryption:init
|
||||
|
||||
$ vim .env.production
|
||||
ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY=xxx
|
||||
ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT=xxx
|
||||
ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY=xxx
|
||||
```
|
||||
|
68
compose.yml
Normal file
68
compose.yml
Normal file
@ -0,0 +1,68 @@
|
||||
services:
|
||||
ms_db:
|
||||
restart: always
|
||||
image: postgres:14-alpine
|
||||
shm_size: 256mb
|
||||
networks:
|
||||
- internal_network
|
||||
healthcheck:
|
||||
test: ['CMD', 'pg_isready', '-U', 'postgres']
|
||||
volumes:
|
||||
- ./postgres14:/var/lib/postgresql/data
|
||||
environment:
|
||||
- POSTGRES_HOST_AUTH_METHOD=trust
|
||||
- POSTGRES_PASSWORD=xxx
|
||||
- PGPORT=5432
|
||||
|
||||
ms_redis:
|
||||
restart: always
|
||||
image: redis:7-alpine
|
||||
networks:
|
||||
- internal_network
|
||||
healthcheck:
|
||||
test: ['CMD', 'redis-cli', 'ping']
|
||||
volumes:
|
||||
- ./redis:/data
|
||||
|
||||
mastodon:
|
||||
build: .
|
||||
image: tootsuite/mastodon:edge
|
||||
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:
|
||||
# prettier-ignore
|
||||
test: ['CMD-SHELL', 'wget -q --spider --proxy=off localhost:3000/health || exit 1']
|
||||
ports:
|
||||
- '0.0.0.0:3000:3000'
|
||||
depends_on:
|
||||
- ms_db
|
||||
- ms_redis
|
||||
# - es
|
||||
volumes:
|
||||
- ./public/system:/mastodon/public/system
|
||||
|
||||
sidekiq:
|
||||
build: .
|
||||
image: tootsuite/mastodon:edge
|
||||
restart: always
|
||||
env_file: .env.production
|
||||
command: bundle exec sidekiq
|
||||
depends_on:
|
||||
- ms_db
|
||||
- ms_redis
|
||||
networks:
|
||||
- external_network
|
||||
- internal_network
|
||||
volumes:
|
||||
- ./public/system:/mastodon/public/system
|
||||
healthcheck:
|
||||
test: ['CMD-SHELL', "ps aux | grep '[s]idekiq\ 6' || false"]
|
||||
|
||||
networks:
|
||||
external_network:
|
||||
internal_network:
|
||||
internal: true
|
Loading…
Reference in New Issue
Block a user