2024-05-03 03:04:43 +00:00
|
|
|
x-environment: &common-env
|
|
|
|
WEBSITES_READONLY: "${READONLY:-0}"
|
|
|
|
|
|
|
|
services:
|
|
|
|
websites:
|
|
|
|
build: .
|
|
|
|
image: websites4
|
2024-05-09 02:10:00 +00:00
|
|
|
restart: unless-stopped
|
2024-05-03 03:04:43 +00:00
|
|
|
volumes:
|
|
|
|
- .:/app
|
|
|
|
- e621_thumbnail_data:/data/e621-thumbnails
|
|
|
|
- oceanic_docs_data:/data/oceanic-docs
|
2024-06-29 07:13:04 +00:00
|
|
|
- yiffy2_image_data:/data/yiffy2
|
2024-05-03 03:04:43 +00:00
|
|
|
tmpfs:
|
|
|
|
- /app/tmp/pids
|
|
|
|
environment:
|
|
|
|
<<: *common-env
|
|
|
|
RAILS_ENV: development
|
|
|
|
depends_on:
|
|
|
|
postgres:
|
|
|
|
condition: service_started
|
|
|
|
redis:
|
|
|
|
condition: service_started
|
|
|
|
labels:
|
|
|
|
- "hostname=websites4.containers.local"
|
|
|
|
tty: true
|
|
|
|
|
|
|
|
postgres:
|
|
|
|
image: postgres:14-alpine
|
|
|
|
volumes:
|
|
|
|
- db_data:/var/lib/postgresql/data
|
|
|
|
restart: unless-stopped
|
|
|
|
environment:
|
|
|
|
- POSTGRES_USER=websites
|
|
|
|
- POSTGRES_DB=websites
|
|
|
|
- POSTGRES_HOST_AUTH_METHOD=trust
|
|
|
|
healthcheck:
|
|
|
|
interval: 5s
|
|
|
|
timeout: 2s
|
|
|
|
test: pg_isready -U websites
|
|
|
|
hostname: postgres.websites4.containers.local
|
|
|
|
labels:
|
|
|
|
- "hostname=postgres.websites4.containers.local"
|
|
|
|
networks:
|
|
|
|
- default
|
|
|
|
|
|
|
|
redis:
|
|
|
|
image: redis:alpine
|
|
|
|
command: redis-server --save 10 1 --loglevel warning
|
|
|
|
volumes:
|
|
|
|
- redis_data:/data
|
|
|
|
restart: unless-stopped
|
|
|
|
healthcheck:
|
|
|
|
test: redis-cli ping
|
|
|
|
interval: 10s
|
|
|
|
timeout: 5s
|
|
|
|
hostname: redis.websites4.containers.local
|
|
|
|
labels:
|
|
|
|
- "hostname=redis.websites4.containers.local"
|
|
|
|
networks:
|
|
|
|
- default
|
|
|
|
|
2024-06-04 19:48:30 +00:00
|
|
|
opensearch:
|
|
|
|
image: opensearchproject/opensearch:2.13.0
|
|
|
|
environment:
|
|
|
|
- discovery.type=single-node
|
|
|
|
- logger.level=WARN
|
|
|
|
- DISABLE_SECURITY_PLUGIN=true
|
|
|
|
- DISABLE_INSTALL_DEMO_CONFIG=true
|
|
|
|
- OPENSEARCH_JAVA_OPTS=-Xms1g -Xmx1g
|
|
|
|
volumes:
|
|
|
|
- opensearch_data:/usr/share/opensearch/data
|
|
|
|
init: true
|
|
|
|
healthcheck:
|
|
|
|
interval: 5s
|
|
|
|
timeout: 2s
|
|
|
|
retries: 12
|
|
|
|
test: curl "opensearch:9200/_cluster/health?wait_for_status=yellow&timeout=2s"
|
|
|
|
hostname: opensearch.websites4.containers.local
|
|
|
|
labels:
|
|
|
|
- "hostname=opensearch.websites4.containers.local"
|
|
|
|
networks:
|
|
|
|
- default
|
|
|
|
|
2024-05-03 05:29:17 +00:00
|
|
|
imgen:
|
|
|
|
image: ghcr.io/donovandmc/imgen
|
|
|
|
init: true
|
|
|
|
volumes:
|
|
|
|
- ./docker/imgen:/app
|
|
|
|
restart: always
|
|
|
|
healthcheck:
|
|
|
|
interval: 10s
|
|
|
|
timeout: 2s
|
|
|
|
test: lsof -i :3621 || exit 1
|
|
|
|
depends_on:
|
|
|
|
rethinkdb:
|
|
|
|
condition: service_started
|
|
|
|
redis:
|
|
|
|
condition: service_healthy
|
|
|
|
deploy:
|
|
|
|
resources:
|
|
|
|
limits:
|
|
|
|
memory: 256M
|
|
|
|
cpus: "1"
|
|
|
|
environment:
|
|
|
|
<<: *common-env
|
|
|
|
hostname: imgen.websites4.containers.local
|
|
|
|
labels:
|
|
|
|
- "hostname=imgen.websites4.containers.local"
|
|
|
|
|
|
|
|
rethinkdb:
|
|
|
|
image: rethinkdb
|
|
|
|
command: rethinkdb --bind all -n rdb
|
|
|
|
volumes:
|
|
|
|
- rethinkdb_data:/data
|
|
|
|
deploy:
|
|
|
|
resources:
|
|
|
|
limits:
|
|
|
|
memory: 256M
|
|
|
|
reservations:
|
|
|
|
memory: 64M
|
|
|
|
restart: always
|
|
|
|
hostname: rethinkdb.websites4.containers.local
|
|
|
|
labels:
|
|
|
|
- "hostname=rethinkdb.websites4.containers.local"
|
2024-10-13 06:04:55 +00:00
|
|
|
|
|
|
|
iqdb:
|
|
|
|
image: ghcr.io/e621ng/iqdb:ad5e363879d4e4b80a0821253ae610b7859c5d32
|
|
|
|
command: iqdb http 0.0.0.0 5588 /iqdb/iqdb.db
|
|
|
|
healthcheck:
|
|
|
|
test: wget --no-verbose --tries=1 --spider http://127.0.0.1:5588/status || exit 1
|
|
|
|
interval: 30s
|
|
|
|
timeout: 2s
|
|
|
|
retries: 5
|
|
|
|
volumes:
|
|
|
|
- iqdb_data:/iqdb
|
|
|
|
hostname: iqdb.websites4.containers.local
|
|
|
|
labels:
|
|
|
|
- "hostname=iqdb.websites4.containers.local"
|
2024-05-03 05:29:17 +00:00
|
|
|
|
2024-05-03 03:04:43 +00:00
|
|
|
networks:
|
|
|
|
default:
|
|
|
|
name: websites4
|
|
|
|
driver: bridge
|
|
|
|
ipam:
|
|
|
|
driver: default
|
|
|
|
config:
|
2024-07-07 13:08:56 +00:00
|
|
|
- subnet: 172.19.2.0/27
|
2024-06-06 09:43:29 +00:00
|
|
|
driver_opts:
|
|
|
|
com.docker.network.bridge.name: br-websites
|
2024-05-03 03:04:43 +00:00
|
|
|
|
|
|
|
volumes:
|
|
|
|
db_data:
|
|
|
|
redis_data:
|
2024-06-04 19:48:30 +00:00
|
|
|
opensearch_data:
|
2024-05-03 03:04:43 +00:00
|
|
|
e621_thumbnail_data:
|
2024-06-29 07:13:04 +00:00
|
|
|
yiffy2_image_data:
|
2024-05-03 03:04:43 +00:00
|
|
|
oceanic_docs_data:
|
2024-05-03 05:29:17 +00:00
|
|
|
rethinkdb_data:
|
2024-10-13 06:04:55 +00:00
|
|
|
iqdb_data:
|