diff --git a/Dockerfile b/Dockerfile index f2a2150fff3d8cc0e34fe7c0170531b4bf3b7625..e9f64fe622e3945cd138934ad2f0a30dc4fb9d16 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 4c57cedb8a12421ae2d40cd7487d4e4a7caf1d69..e29cdb30aed5e1a6db42eebcc862ef74d34f391e 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