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