-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
56 lines (49 loc) · 1.39 KB
/
docker-compose.yml
File metadata and controls
56 lines (49 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Project: RIT SSE Pip Bot
# Purpose: Docker Compose file for container service definitions and portability
# 9/30/2025
# Author: Orion Mulgrew | RIT SSE
# ----- DO NOT EDIT BELOW THIS LINE -----
services:
bot:
build: .
container_name: pip-discord-bot
restart: unless-stopped
env_file: .env
# Database should start before bot
depends_on:
- db
ports:
- "3000:3000"
# Production: Remove these mounts
volumes:
- .:/usr/src/pip-bot
# This prevents local and container node_modules from colliding
- /usr/src/pip-bot/node_modules
networks:
- bot-network
db:
# Official PostgreSQL image, tagged for Debian 11 (Bullseye)
image: postgres:16-bullseye
container_name: pip-postgres-db
restart: unless-stopped
env_file: .env
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
# This helps persist db states across container restarts
volumes:
- postgres-data:/var/lib/postgresql/data
- ./db/init:/docker-entrypoint-initdb.d
# Ports avoid conflicts if local Postgres is installed, but allow 'remote' connection
ports:
- "5433:5432"
networks:
- bot-network
# Allows bot to talk to db
networks:
bot-network:
driver: bridge
# Defines a Postgres volume to connect to
volumes:
postgres-data: