Skip to content

Commit

Permalink
Remove db image Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
curlew committed May 5, 2024
1 parent 122f44f commit 6b167e3
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 20 deletions.
4 changes: 2 additions & 2 deletions bot/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# syntax=docker/dockerfile:1

FROM python:3.8-slim-bookworm
LABEL org.opencontainers.image.source=https://github.com/curlew/discord-bot

WORKDIR /bot

COPY ./requirements.txt .
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

COPY . .

CMD ["python", "bot.py"]
28 changes: 15 additions & 13 deletions docker-compose.yml → compose.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,22 @@
services:
bot:
container_name: discord-bot
image: ghcr.io/curlew/discord-bot:latest
build: ./bot
restart: always
env_file:
- .env
depends_on:
db:
condition: service_healthy

db:
container_name: bot-db
build: ./db
container_name: discord-bot-db
image: postgres:alpine3.18
restart: always
volumes:
- ./data:/var/lib/postgresql/data
- ./db/init.sql:/docker-entrypoint-initdb.d/init.sql
env_file:
- .env
healthcheck:
Expand All @@ -12,14 +25,3 @@ services:
timeout: 5s
start_period: 20s
retries: 5
restart: on-failure

bot:
container_name: bot-app
build: ./bot
env_file:
- .env
depends_on:
db:
condition: service_healthy
restart: on-failure
5 changes: 0 additions & 5 deletions db/Dockerfile

This file was deleted.

0 comments on commit 6b167e3

Please sign in to comment.