Merge branch 'master' of https://git.roysathome.net/joseph/roysathome.net
This commit is contained in:
commit
7e78a9245a
|
@ -17,6 +17,12 @@ TOKEN_SECRET = ENV['JWT_SECRET_KEY']
|
|||
puts TOKEN_SECRET
|
||||
initialize_database
|
||||
|
||||
get '/' do
|
||||
content_type :json
|
||||
|
||||
return {result: "Service up and running"}.to_json
|
||||
end
|
||||
|
||||
post '/auth/login' do
|
||||
content_type :json
|
||||
|
||||
|
|
|
@ -1,20 +1,14 @@
|
|||
# Stage 1: Build stage with git
|
||||
FROM ubuntu:jammy AS GITCOPY
|
||||
FROM ruby:3.2.2
|
||||
|
||||
WORKDIR /roysathome
|
||||
WORKDIR /roysathome/
|
||||
|
||||
RUN apt-get update && apt-get install -y git
|
||||
|
||||
RUN git clone https://git.roysathome.net/joseph/roysathome.net.git .
|
||||
|
||||
WORKDIR ./auth
|
||||
|
||||
# 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
|
||||
|
||||
RUN bundle install
|
||||
|
||||
CMD ["ruby","./auth.rb"]
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
version: "3"
|
||||
|
||||
services:
|
||||
server:
|
||||
auth_server:
|
||||
container_name: auth
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
image: auth_server
|
||||
ports:
|
||||
- "47706:4567"
|
||||
volumes:
|
||||
|
|
Loading…
Reference in New Issue