Merge pull request #101 from Retrospring/feature/housekeeping

General housekeeping
This commit is contained in:
Georg Gadinger 2020-05-09 10:44:29 +02:00 committed by GitHub
commit af514aa564
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 56 additions and 72 deletions

8
.docker/entrypoint.sh Normal file
View File

@ -0,0 +1,8 @@
#!/bin/bash
set -e
# Remove a potentially pre-existing server.pid for Rails.
rm -f /app/tmp/pids/server.pid
# Then exec the container's main process (what's set as CMD in the Dockerfile).
exec "$@"

View File

@ -1,30 +1,25 @@
FROM ruby:2.7 FROM ruby:2.7
RUN apt-get update -qq && apt-get install -y build-essential RUN curl -sL https://deb.nodesource.com/setup_12.x | bash -
# for postgres RUN apt-get update -qq \
RUN apt-get install -y libpq-dev && apt-get install -y --no-install-recommends build-essential \
libpq-dev postgresql-client \
# for nokogiri libxml2-dev libxslt1-dev \
RUN apt-get install -y libxml2-dev libxslt1-dev libmagickwand-dev imagemagick \
nodejs \
# for images
RUN apt-get install -y libmagickwand-dev imagemagick
# for a JS runtime
RUN curl -sL https://deb.nodesource.com/setup_6.x | bash -
RUN apt-get install -y nodejs
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
postgresql-client \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
ENV APP_HOME /app RUN mkdir /app
RUN mkdir $APP_HOME WORKDIR /app
WORKDIR $APP_HOME
ADD Gemfile* $APP_HOME/ ADD Gemfile* /app/
RUN bundle install RUN bundle install
COPY . /app
COPY .docker/entrypoint.sh /usr/bin/
RUN chmod +x /usr/bin/entrypoint.sh
ENTRYPOINT ["entrypoint.sh"]
EXPOSE 3000 EXPOSE 3000
CMD ["rails", "server", "-b", "0.0.0.0"]

27
.github/CODEOWNERS vendored Normal file
View File

@ -0,0 +1,27 @@
# Retrospring CODEOWNERS
# General code ownership
* @nilsding @pixeldesu
# Ruby/Backend related code
*.rb @nilsding
# Frontend assets
*.coffee @pixeldesu
*.scss @pixeldesu
# Frontend views
*.haml @pixeldesu
# Public documents
/service-docs/ @pixeldesu
# Localization
/config/locales/ @pixeldesu
# Tests
/spec/ @nilsding
# Docker setup related files
Dockerfile @pixeldesu
docker-compose.yml @pixeldesu

View File

@ -5,9 +5,6 @@ This is the source code that powers Retrospring. This is a detached fork of
[nilsding/justask](https://github.com/nilsding/justask), where we continue [nilsding/justask](https://github.com/nilsding/justask), where we continue
development. development.
Retrospring shut down on June 12, 2016, but it's somehow still alive. You're
welcome.
## Installation ## Installation
You can find all the installation instructions needed for a local/production You can find all the installation instructions needed for a local/production
@ -18,7 +15,7 @@ setup of Retrospring in the
Guidelines for Pull Requests and general information about how you can help us Guidelines for Pull Requests and general information about how you can help us
improving Retrospring can be found improving Retrospring can be found
[here](https://github.com/Retrospring/retrospring/blob/master/CONTRIBUTING.md). [here](https://github.com/Retrospring/retrospring/blob/master/.github/CONTRIBUTING.md).
## License ## License

42
TODO
View File

@ -1,42 +0,0 @@
Not done:
[001| 0%] user blocking (prohibits blocked user from asking question to that person and seeing their answers)
[007| 20%] (?) keyboard shortcuts
|----- Open "Ask your followers" with Ctrl/Meta+M
[015| 0%] make a public accessible API (maybe even as an oauth provider?)
[016| 5%] WRYYYYte more specs
[022| 0%] recommended follows
|----- Solved with Discover (?)
[023| 0%] disabling group-questions
[024| 0%] disabling questions from certain users
In Progress:
[003| 75%] file uploads (for now only avatars, file uploads for embedding images in questions MAYBE LATER)
[011| 75%] auto-posting to other services (twatter, fakelook)
Finished:
[002|100%] asking modal (ask all followers/one person a question with a modal you can open over the navbar)
[004|100%] admin status page (like the one from justask2 in Python)
[005|100%] make the hamburger menu button glow or something if there are new questions in the inbox
[006|100%] privacy options (e.g. profile visible for members only, disable anonymous questions, opt-out from public timeline)
[008|100%] make email work!
[009|100%] a notification view or something
[013|100%] restructure questions (has_many :answers) for less redundancy in the DB when implementing #002
[014|100%] generate questions if there are none in the inbox (probably make it as a gem)
[018|100%] that annoying "we use cookies" thing every website in the EU must? add
[019|100%] omniAuth (twatter, fakelook, goggles plus) for social networking elitists
[021|100%] deleting comments
|----- restructure comment design
[012|100%] (?) open source the entire thing in late 2015 or 2016 maybe, after we got bought by fakelook.
[017|100%] write "terms of service" and a privacy policy.
[025|100%] answering options (sharing/nsfw/private) in inbox panels
[026|100%] profile headers
[027| 66%] moderation
|----- moderator user group √
|----- moderation panel √
|----- ability to report questions √
Needs rewrite:
[010|100%] locales (these can wait for now)
Stalled:
[020| 0%] helper function for profile headings to resize on certain string length

View File

@ -2,12 +2,11 @@ version: "3.7"
services: services:
web: web:
build: build:
context: . context: .
dockerfile: .docker/ruby/Dockerfile dockerfile: .docker/ruby/Dockerfile
command: command: bash -c "rm -f tmp/pids/server.pid && bundle exec rails s -p 3000 -b '0.0.0.0'"
ruby bin/rails server --port 3000 --binding 0.0.0.0 depends_on:
links:
- postgres - postgres
- redis - redis
environment: environment: