auth_server #1

Merged
joseph merged 5 commits from auth_server into master 2023-12-12 22:53:56 +00:00
3 changed files with 36 additions and 1 deletions
Showing only changes of commit 67aaee9a72 - Show all commits

View File

@ -2,7 +2,8 @@
source "https://rubygems.org"
ruby '3.2.2'
#ruby '3.2.2'
ruby '2.6.10'
gem 'sinatra'
gem 'webrick'

12
auth/docker_compose.yml Normal file
View File

@ -0,0 +1,12 @@
version: "3"
services:
app:
build:
context: .
dockerfile: Dockerfile
ports:
- "4567:4567"
volumes:
- ./auth:/app # Adjust the path accordingly
command: ["./auth.rb"]

22
auth/dockerfile Normal file
View File

@ -0,0 +1,22 @@
# Stage 1: Build stage with git
FROM ubuntu:jammy AS GITCOPY
WORKDIR /roysathome
RUN apt-get update && apt-get install -y git
RUN git clone https://git.roysathome.net/joseph/roysathome.net.git .
# Stage 2: Final image with Ruby
FROM ruby:3.2.2
# Copy files from the first stage
COPY --from=GITCOPY /roysathome/auth /app
WORKDIR /app
# Gemfile and Gemfile.lock are already in /usr/src/app/roysathome/auth due to the previous COPY command
RUN bundle install
CMD ["./auth.rb"]