1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-11-18 00:31:00 -05:00

Compare commits

...

3 Commits

Author SHA1 Message Date
toast-ts
b366680895 "is PostgreSQL running?" 2024-01-28 18:27:57 +11:00
toast-ts
6399099ccb Add Redis slave 2024-01-28 18:24:28 +11:00
toast-ts
ebca16e5a5 Merge branch from Novdec 2024-01-28 17:12:32 +11:00
4 changed files with 43 additions and 2 deletions

16
.dockerignore Normal file
View File

@ -0,0 +1,16 @@
# Pointless stuff
Dockerfile
docker-compose.yml
.ncurc.json
.env
.mailmap
.github
.vscode
.github
postgres-replica-stuff
README.md
ufwReject.sh
# Startup files
startWithYarn.cjs
botStartup.bat

11
Dockerfile Normal file
View File

@ -0,0 +1,11 @@
FROM node:21.1.0-bookworm-slim
ENV YARN_VERSION 4.0.2
RUN yarn policies set-version $YARN_VERSION
RUN apt update -y && apt upgrade -y && apt install -y git
RUN npm install -g typescript
WORKDIR /Daggerbot
RUN git config --global --add safe.directory /Daggerbot
COPY tsconfig.json package.json yarn.lock .yarnrc.yml ./
RUN yarn workspaces focus
CMD [ "yarn", "node", "." ]

View File

@ -1,4 +1,12 @@
services: services:
bot:
container_name: daggerbot-prod
build: .
restart: unless-stopped
volumes:
- ./.git:/Daggerbot/.git:rw
- ./src/:/Daggerbot/src/:rw
- ./dist/:/Daggerbot/dist/:rw
cache: cache:
container_name: redis-cache container_name: redis-cache
image: redis/redis-stack-server:7.2.0-v6 image: redis/redis-stack-server:7.2.0-v6

View File

@ -1,13 +1,19 @@
# This is for the Slave node, Master node is in the root directory of the same file. # This is for the Slave node, Master node is in the root directory of the same file.
services: services:
cache-slave:
container_name: redis-cache-slave
image: redis/redis-stack-server:7.2.0-v6
restart: unless-stopped
ports:
- 6379:6379/tcp
db-slave: db-slave:
container_name: postgres-slave container_name: postgres-slave
image: postgres:16.1-alpine3.19 image: postgres:16.1-alpine3.19
restart: unless-stopped restart: unless-stopped
ports: ports:
- 5433:5432/tcp - 5432:5432/tcp
volumes: volumes:
- /var/lib/docker/volumes/daggerbot-db-slave:/var/lib/postgresql/data:rw - /var/lib/docker/volumes/daggerbot-db:/var/lib/postgresql/data:rw
- ./configs/postgres-hba.conf:/var/lib/postgresql/data/pg_hba.conf:rw - ./configs/postgres-hba.conf:/var/lib/postgresql/data/pg_hba.conf:rw
- ./configs/postgres.conf:/var/lib/postgresql/data/postgresql.conf:rw - ./configs/postgres.conf:/var/lib/postgresql/data/postgresql.conf:rw
environment: environment: