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