From 041939af61260d39d7691c2f2a704d89931edc46 Mon Sep 17 00:00:00 2001 From: Jeffrey Phillips Freeman <jeffrey.freeman@syncleus.com> Date: Sun, 1 Sep 2019 15:42:50 +0200 Subject: [PATCH] Added some configuration that makes post install a bit easier to work with. --- Dockerfile | 8 ++++++++ README.md | 6 +++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index f2a2150..e9f64fe 100644 --- a/Dockerfile +++ b/Dockerfile @@ -33,9 +33,17 @@ RUN apt-get install -y nodejs && npm install -g yarn # Configure database RUN /etc/init.d/postgresql restart && /etc/init.d/postgresql status && sudo -u postgres createuser -U postgres vagrant -s && sudo -u postgres createuser -U postgres root -s && sudo -u postgres createdb -U postgres mastodon_development +RUN echo "host all all 0.0.0.0/0 trust" > /etc/postgresql/10/main/pg_hba.conf +RUN echo "local all all trust" >> /etc/postgresql/10/main/pg_hba.conf # Run the command on container startup EXPOSE 3000 ENV BIND="0.0.0.0" +ENV OTP_SECRET="73f8f9a16e114be94ffb5378b323da045692d7d4afd4e4c96a4c9f9b423a7e6d820855440d2fab5e2d93e3c557c0a4515cec50a1dff6a89479a410ed5a3fe212" +ENV SECRET_KEY_BASE="c7b1664cf5af7943a357357669a58a5720f8fa83248542c99e5a47422fa9df422c12748a3dc700c8f1207d2a4dbc0629061d8aecaa8820d52dde64223e5ce3f8" +ENV DB_HOST=127.0.0.1 +ENV DB_USER=root +ENV DB_PASS="" +ENV DB_NAME="mastodon_development" COPY entrypoint.sh /root/entrypoint.sh CMD bash /root/entrypoint.sh diff --git a/README.md b/README.md index 4c57ced..e29cdb3 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,9 @@ Just run the following: -docker run -p 3000:3000 --volume="$PWD:/qoto" qotoorg/qoto-test:1 +docker run -p 3000:3000 --volume="$PWD:/qoto" qotoorg/qoto-test:latest This will determine what version of ruby the mastodon repo needs, install it into the container, then run bundle and yarn install, setup a database, setup redis and then run the server at http://localhost:3000 + +You can then run this within the container to generate an admin user: + +RAILS_ENV=production bin/tootctl accounts create dev --email dev@mastodon.local --confirmed --role admin -- GitLab