mirror of
https://github.com/ahmadk953/poixpixel-discord-bot.git
synced 2025-05-10 10:43:06 +00:00
feat: merge pull request #345 from ahmadk953/docker-configuration
add docker-compose for setting up bot services
This commit is contained in:
commit
0610bd41c4
3 changed files with 51 additions and 1 deletions
4
.env.example
Normal file
4
.env.example
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
POSTGRES_USER=your_postgres_user
|
||||||
|
POSTGRES_PASSWORD=your_postgres_password
|
||||||
|
POSTGRES_DB=your_database_name
|
||||||
|
VALKEY_PASSWORD=your_valkey_password
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -3,4 +3,5 @@ node_modules/
|
||||||
drizzle/
|
drizzle/
|
||||||
.vscode/
|
.vscode/
|
||||||
config.json
|
config.json
|
||||||
|
.env
|
||||||
.yarn
|
.yarn
|
45
docker-compose.yml
Normal file
45
docker-compose.yml
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
services:
|
||||||
|
postgres:
|
||||||
|
image: postgres:17-alpine
|
||||||
|
container_name: postgres
|
||||||
|
restart: always
|
||||||
|
environment:
|
||||||
|
POSTGRES_USER: ${POSTGRES_USER}
|
||||||
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||||
|
POSTGRES_DB: ${POSTGRES_DB}
|
||||||
|
volumes:
|
||||||
|
- postgres_data:/var/lib/postgresql/data
|
||||||
|
ports:
|
||||||
|
- "5432:5432"
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER}"]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
networks:
|
||||||
|
- backend
|
||||||
|
|
||||||
|
valkey:
|
||||||
|
image: valkey/valkey:8-alpine
|
||||||
|
container_name: valkey
|
||||||
|
restart: always
|
||||||
|
command: ["valkey-server", "--requirepass", "${VALKEY_PASSWORD}"]
|
||||||
|
ports:
|
||||||
|
- "6379:6379"
|
||||||
|
volumes:
|
||||||
|
- valkey_data:/data
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "valkey-cli", "-a", "${VALKEY_PASSWORD}", "ping"]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
networks:
|
||||||
|
- backend
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
postgres_data:
|
||||||
|
valkey_data:
|
||||||
|
|
||||||
|
networks:
|
||||||
|
backend:
|
||||||
|
driver: bridge
|
Loading…
Add table
Add a link
Reference in a new issue