diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..1a5a0a8 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "Image Gen"] + path = docker/imgen + url = https://github.com/DonovanDMC/ImageGen diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index 700e647..25e11f9 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -29,7 +29,7 @@ services: postgres: image: postgres:14-alpine volumes: - - db_data:/var/lib/postgresql/data + - ./data/postgres:/var/lib/postgresql/data restart: unless-stopped environment: - POSTGRES_USER=websites @@ -49,7 +49,7 @@ services: image: redis:alpine command: redis-server --save 10 1 --loglevel warning volumes: - - redis_data:/data + - ./data/redis:/data restart: unless-stopped healthcheck: test: redis-cli ping @@ -61,6 +61,51 @@ services: networks: - default + 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 + container_name: rethinkdb.websites4 + volumes: + - ./data/rethink:/data + deploy: + resources: + limits: + memory: 256M + reservations: + memory: 64M + restart: always + hostname: rethinkdb.websites4.containers.local + labels: + - "hostname=rethinkdb.websites4.containers.local" + networks: + - default + networks: default: name: websites4 @@ -69,7 +114,3 @@ networks: driver: default config: - subnet: 172.19.3.64/27 - -volumes: - db_data: - redis_data: diff --git a/docker-compose.yml b/docker-compose.yml index 80cb6d0..9517985 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -58,6 +58,51 @@ services: networks: - default + 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 + container_name: rethinkdb.websites4 + 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" + networks: + - default + networks: default: name: websites4 @@ -72,3 +117,4 @@ volumes: redis_data: e621_thumbnail_data: oceanic_docs_data: + rethinkdb_data: diff --git a/docker/imgen b/docker/imgen new file mode 160000 index 0000000..3f2a2ca --- /dev/null +++ b/docker/imgen @@ -0,0 +1 @@ +Subproject commit 3f2a2cafc5adb72ef6a0aa69026ce0197e1833fe