Fixed workflow and Dockerfile/Compose.
Some checks failed
Deploy Cletus Bot / deploy (push) Failing after 10s

This commit is contained in:
roberts 2025-05-10 16:28:29 -05:00
parent 4aacdd45ce
commit c30193da85
3 changed files with 19 additions and 15 deletions

View file

@ -8,21 +8,26 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: 📥 Checkout code
- name: Checkout code
uses: actions/checkout@v3
- name: 🐢 Set up Node.js
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 20
- name: 📦 Install dependencies
- name: Install dependencies
run: npm install
- name: 🧱 Build and Deploy with Compose
- name: Copy config to deployment path
run: |
echo "Copying config.json to deployment folder..."
cp ./bot/config.json /mnt/user/game-servers/cletus/config.json
- name: Build and Deploy with Compose
run: |
docker compose down || true
docker compose up -d --build
- name: 📄 Show logs
- name: Show logs
run: docker logs --since 10s cletus-bot

View file

@ -1,15 +1,15 @@
FROM node:20
WORKDIR /app
# Copy dependency info and install
COPY package*.json ./
RUN npm install
# Copy the rest of the app (including bot/ directory)
COPY . .
# Set working dir to bot folder
WORKDIR /app/bot
CMD ["node", "bot.js"]
ENTRYPOINT ["bash", "-c"]
CMD ["node", "bot.js"]

View file

@ -2,7 +2,6 @@ version: '3.8'
services:
cletus-bot:
network_mode: host
container_name: cletus-bot
build:
context: .
@ -11,9 +10,9 @@ services:
- linux/amd64
image: cletus-bot
restart: unless-stopped
volumes:
- ./bot/db:/app/bot/db
- ./bot/bot-tasks:/app/bot/bot-tasks
stdin_open: true
tty: true
volumes:
- /mnt/user/game-servers/cletus/db:/app/bot/db
- /mnt/user/game-servers/cletus/bot-tasks:/app/bot/bot-tasks
- /mnt/user/game-servers/cletus/config.json:/app/bot/config.json