From 1c19c8b60e2d1dfac40447750b01bda33b42a77a Mon Sep 17 00:00:00 2001 From: reesericci Date: Thu, 18 Apr 2024 08:38:45 -0500 Subject: [PATCH] Initial container files --- Containerfile | 16 ++++++++++++++++ docker-compose.yml | 16 ++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 Containerfile create mode 100644 docker-compose.yml diff --git a/Containerfile b/Containerfile new file mode 100644 index 0000000..f6e932d --- /dev/null +++ b/Containerfile @@ -0,0 +1,16 @@ +FROM ruby:3.3 + +# throw errors if Gemfile has been modified since Gemfile.lock +RUN bundle config --global frozen 1 + +WORKDIR /srv/oblong/ + +COPY Gemfile Gemfile.lock ./ +RUN bundle install +RUN RAILS_ENV=production bin/rails assets:precompile + +COPY . . + +EXPOSE 3000 + +CMD ["bundle", "exec", "puma", "-e", "production", "-b", "0.0.0.0:3000"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..d1600e1 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,16 @@ +services: + panel: + build: . + ports: + - 127.0.0.1:3000:3000 + + postgresql: + image: postgres + volumes: + - postgres-data:/var/lib/postgresql/data + environment: + POSTGRES_PASSWORD: changeme + POSTGRES_DB: oblong + +volumes: + postgres-data: \ No newline at end of file