Skip to content

Commit

Permalink
Update Dockerfile and sqlite usage
Browse files Browse the repository at this point in the history
Minor refactor to how sqlite gem is loaded
Updated ruby to 3.3.0 for docker image
Updated alpine linux to 3.19 for docker image
  • Loading branch information
Humblemonk committed Jan 25, 2024
1 parent be7c362 commit 5e6d5c7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 8.6.2 - 2024-01-24
### Added
- Refactored sqlite usage
- Updated dockerfile to ruby 3.3.0
- Updated dockerfile to alpine linux 3.19

## 8.6.1 - 2024-01-24
### Added
- Minor changes to command text outputs
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM ruby:2.7.2-alpine3.12
FROM ruby:3.3.0-alpine3.19

COPY . /opt/dicemaiden
WORKDIR /opt/dicemaiden

RUN apk update
RUN apk add --no-cache curl wget bash git ruby ruby-bundler sqlite-dev
RUN apk add --no-cache curl wget bash git ruby ruby-bundler
RUN apk add --virtual build-dependencies build-base

RUN bundle install
Expand Down
4 changes: 2 additions & 2 deletions dice_maiden.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Dice bot for Discord
# Author: Humblemonk
# Version: 8.6.1
# Version: 8.6.2
# Copyright (c) 2017. All rights reserved.
# !/usr/bin/ruby
# If you wish to run a single instance of this bot, please follow the "Manual Install" section of the readme!
Expand All @@ -11,7 +11,6 @@
require 'dicebag'
require 'dotenv'
require 'rest-client'
require 'sqlite3'

Dotenv.load
@total_shards = ENV['SHARD'].to_i
Expand All @@ -28,6 +27,7 @@
if @launch_option == 'lite'
# do nothing
else
require 'sqlite3'
$db = SQLite3::Database.new 'main.db'
$db.busy_timeout = (10_000)
end
Expand Down

0 comments on commit 5e6d5c7

Please sign in to comment.