more container stuff

This commit is contained in:
stryan 2022-08-11 14:56:39 -04:00
parent 4ab79e2893
commit e6a0d3414d
2 changed files with 22 additions and 8 deletions

View File

@ -1,14 +1,28 @@
FROM ruby:3.1.2 FROM ruby:3.1.2-alpine
RUN apk upgrade --update && \
apk add --no-cache \
bash \
ca-certificates \
curl \
less \
libstdc++ \
libressl-dev \
g++ \
tzdata \
make \
shared-mime-info \
zlib-dev && \
rm -rf /var/cache/apk/*
WORKDIR /srv/
RUN mkdir /srv/stevefolder RUN mkdir /srv/stevefolder
WORKDIR /srv/stevefolder WORKDIR /srv/stevefolder
COPY Gemfile Gemfile COPY Gemfile Gemfile.lock ./
COPY Gemfile.lock Gemfile.lock
COPY . .
RUN mkdir spool
RUN bundle install RUN bundle install
COPY main.rb folder.rb ./
RUN mkdir spool
ENTRYPOINT ["ruby", "main.rb"] ENTRYPOINT ["ruby", "main.rb"]

View File

@ -20,7 +20,7 @@ if prefix == ""
end end
logger.info("starting with prefix #{prefix}") logger.info("starting with prefix #{prefix}")
config_obj = YAML::load_file( '#{prefix}config.yaml' ) config_obj = YAML::load_file( "#{prefix}config.yaml" )
logger.info("loaded config") logger.info("loaded config")
bot = Discordrb::Commands::CommandBot.new token: config_obj["bot_token"], prefix: "!folder" bot = Discordrb::Commands::CommandBot.new token: config_obj["bot_token"], prefix: "!folder"
folder = Folder.new folder = Folder.new