Skip to content

Commit 9d9e732

Browse files
committed
push
1 parent c964fdf commit 9d9e732

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

docker/docker-compose.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: rodhaj
2+
3+
services:
4+
rodhaj:
5+
container_name: rodhaj
6+
image: ghcr.io/transprogrammer/rodhaj:latest
7+
volumes:
8+
# Do not edit the next line. If you want to change the media storage location on your system, edit the value of UPLOAD_LOCATION in the .env file
9+
- ${CONFIG_LOCATION}:/rodhaj/bot/config.yml
10+
env_file:
11+
- .env
12+
ports:
13+
- 8555:3001
14+
depends_on:
15+
- database
16+
restart: always
17+
18+
database:
19+
container_name: rodhaj_postgres
20+
image: rodhaj/postgres:latest
21+
environment:
22+
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
23+
POSTGRES_USER: ${POSTGRES_USER}
24+
POSTGRES_INITDB_ARGS: '--data-checksums'
25+
volumes:
26+
# Do not edit the next line. If you want to change the database storage location on your system, edit the value of DB_DATA_LOCATION in the .env file
27+
- ${DB_DATA_LOCATION}:/var/lib/postgresql/data
28+
healthcheck:
29+
test: pg_isready --dbname='${POSTGRES_DB}' --username='${POSTGRES_USER}' || exit 1; Chksum="$$(psql --dbname='${POSTGRES_DB}' --username='${POSTGERS_USER}' --tuples-only --no-align --command='SELECT COALESCE(SUM(checksum_failures), 0) FROM pg_stat_database')"; echo "checksum failure count is $$Chksum"; [ "$$Chksum" = '0' ] || exit 1
30+
interval: 5m
31+
start_interval: 30s
32+
start_period: 5m
33+
restart: always

docker/example.env

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# The location of where Rodhaj's configuration is stored.
2+
# The configuration can be found under the config-example.yml
3+
CONFIG_LOCATION=./config.yml
4+
5+
# The location where your database files are stored
6+
DB_DATA_LOCATION=./postgres
7+
8+
# Connection secret for the rodhaj user. You should change it to a random password
9+
RODHAJ_PASSWORD=rodhaj
10+
11+
# Connection secret for the postgres. You should change it to a random password
12+
POSTGRES_PASSWORD=postgres
13+
14+
15+
# The values below this line do not need to be changed
16+
###################################################################################
17+
POSTGRES_USER=postgres
18+
POSTGRES_DB=postgres

0 commit comments

Comments
 (0)