auth_server #1
|
@ -2,7 +2,8 @@
|
||||||
|
|
||||||
source "https://rubygems.org"
|
source "https://rubygems.org"
|
||||||
|
|
||||||
ruby '3.2.2'
|
#ruby '3.2.2'
|
||||||
|
ruby '2.6.10'
|
||||||
|
|
||||||
gem 'sinatra'
|
gem 'sinatra'
|
||||||
gem 'webrick'
|
gem 'webrick'
|
||||||
|
|
|
@ -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"]
|
|
@ -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"]
|
Loading…
Reference in New Issue