From 4982852a4ab8665cee8d6a578614ff867c0f116b Mon Sep 17 00:00:00 2001 From: Reverite Date: Sun, 16 Jun 2019 19:22:45 -0700 Subject: Experiment with slimming back down Dockerfile with newest debian --- Dockerfile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'Dockerfile') diff --git a/Dockerfile b/Dockerfile index 62541d382..fae72de73 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,10 @@ -FROM ubuntu:18.04 as build-dep +FROM debian:buster-slim as build-dep # Use bash for the shell SHELL ["bash", "-c"] # Install Node -ENV NODE_VER="10.15.3" +ENV NODE_VER="10.16.0" RUN echo "Etc/UTC" > /etc/localtime && \ apt update && \ apt -y install wget make gcc g++ python && \ @@ -63,7 +63,7 @@ RUN cd /opt/mastodon && \ bundle install -j$(nproc) --deployment --without development test && \ yarn install --pure-lockfile -FROM ubuntu:18.04 +FROM debian:buster-slim # Copy over all the langs needed for runtime COPY --from=build-dep /opt/node /opt/node @@ -118,8 +118,9 @@ USER mastodon # Precompile assets RUN cd ~ && \ - OTP_SECRET=precompile_placeholder SECRET_KEY_BASE=precompile_placeholder rails assets:precompile && \ - yarn cache clean + OTP_SECRET=_ SECRET_KEY_BASE=_ rails assets:precompile && \ + yarn cache clean && \ + rm -rf /mastodon/tmp/* # Set the work dir and the container entry point WORKDIR /opt/mastodon -- cgit From b2ffaa9f2909c83f23691a02b2843bf41a1a12c0 Mon Sep 17 00:00:00 2001 From: Reverite Date: Sun, 16 Jun 2019 19:27:59 -0700 Subject: Remove webpacker leftovers --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Dockerfile') diff --git a/Dockerfile b/Dockerfile index fae72de73..48de8bb00 100644 --- a/Dockerfile +++ b/Dockerfile @@ -120,7 +120,7 @@ USER mastodon RUN cd ~ && \ OTP_SECRET=_ SECRET_KEY_BASE=_ rails assets:precompile && \ yarn cache clean && \ - rm -rf /mastodon/tmp/* + rm -rf /opt/mastodon/tmp/* # Set the work dir and the container entry point WORKDIR /opt/mastodon -- cgit From 9540fb5518dcda023ffc747367b2303a5c469b07 Mon Sep 17 00:00:00 2001 From: reverite Date: Thu, 27 Jun 2019 10:25:33 -0700 Subject: Use stretch --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Dockerfile') diff --git a/Dockerfile b/Dockerfile index 48de8bb00..1dde3fa3c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM debian:buster-slim as build-dep +FROM debian:stretch as build-dep # Use bash for the shell SHELL ["bash", "-c"] @@ -63,7 +63,7 @@ RUN cd /opt/mastodon && \ bundle install -j$(nproc) --deployment --without development test && \ yarn install --pure-lockfile -FROM debian:buster-slim +FROM debian:stretch-slim # Copy over all the langs needed for runtime COPY --from=build-dep /opt/node /opt/node -- cgit From 60bee8036a093cb879400888f1257d2a703c1354 Mon Sep 17 00:00:00 2001 From: reverite Date: Thu, 27 Jun 2019 16:38:54 -0700 Subject: Retry --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Dockerfile') diff --git a/Dockerfile b/Dockerfile index 1dde3fa3c..9c106f83e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM debian:stretch as build-dep +FROM ubuntu:18.04 as build-dep # Use bash for the shell SHELL ["bash", "-c"] -- cgit From 2d396aa3a0bf2674194b9f4c0e0a1052b8d23a06 Mon Sep 17 00:00:00 2001 From: Reverite Date: Thu, 27 Jun 2019 21:09:53 -0700 Subject: Fix --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Dockerfile') diff --git a/Dockerfile b/Dockerfile index 9c106f83e..dfb9a2686 100644 --- a/Dockerfile +++ b/Dockerfile @@ -63,7 +63,7 @@ RUN cd /opt/mastodon && \ bundle install -j$(nproc) --deployment --without development test && \ yarn install --pure-lockfile -FROM debian:stretch-slim +FROM ubuntu:18.04 # Copy over all the langs needed for runtime COPY --from=build-dep /opt/node /opt/node -- cgit From 007bae4d533f966f3fa11aa785642c9be61cf40e Mon Sep 17 00:00:00 2001 From: Reverite Date: Thu, 19 Sep 2019 12:12:50 -0700 Subject: Test Permission Fix --- Dockerfile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Dockerfile') diff --git a/Dockerfile b/Dockerfile index db9faaba0..d7490adfc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -112,15 +112,15 @@ ENV NODE_ENV="production" ENV RAILS_SERVE_STATIC_FILES="true" ENV BIND="0.0.0.0" -# Set the run user -USER mastodon - # Precompile assets -RUN cd ~ && \ +RUN su - mastodon -c "cd ~ && \ OTP_SECRET=_ SECRET_KEY_BASE=_ rails assets:precompile && \ - yarn cache clean && \ + yarn cache clean" && \ rm -rf /opt/mastodon/tmp/* +# Set the run user +USER mastodon + # Set the work dir and the container entry point WORKDIR /opt/mastodon -ENTRYPOINT ["/tini", "--"] +ENTRYPOINT ["/tini", "--"] \ No newline at end of file -- cgit From 822c904bc99176c5db7209e4c32e5b1257c1f7e3 Mon Sep 17 00:00:00 2001 From: Reverite Date: Thu, 19 Sep 2019 15:39:52 -0700 Subject: Test Docker fix 3 --- Dockerfile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'Dockerfile') diff --git a/Dockerfile b/Dockerfile index d7490adfc..c5225f7bb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -112,11 +112,15 @@ ENV NODE_ENV="production" ENV RAILS_SERVE_STATIC_FILES="true" ENV BIND="0.0.0.0" +USER mastodon + # Precompile assets -RUN su - mastodon -c "cd ~ && \ - OTP_SECRET=_ SECRET_KEY_BASE=_ rails assets:precompile && \ - yarn cache clean" && \ - rm -rf /opt/mastodon/tmp/* +RUN OTP_SECRET=_ SECRET_KEY_BASE=_ rails assets:precompile && yarn cache clean + +# Empty temporary files +USER root + +RUN rm -rf /opt/mastodon/tmp/* # Set the run user USER mastodon -- cgit From 6f79532b73abe92103e1063d9bcc9b584887bcf3 Mon Sep 17 00:00:00 2001 From: Reverite Date: Fri, 20 Sep 2019 15:52:02 -0700 Subject: Oops --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Dockerfile') diff --git a/Dockerfile b/Dockerfile index c5225f7bb..9ad80c0de 100644 --- a/Dockerfile +++ b/Dockerfile @@ -115,7 +115,7 @@ ENV BIND="0.0.0.0" USER mastodon # Precompile assets -RUN OTP_SECRET=_ SECRET_KEY_BASE=_ rails assets:precompile && yarn cache clean +RUN cd ~ && OTP_SECRET=_ SECRET_KEY_BASE=_ rails assets:precompile && yarn cache clean # Empty temporary files USER root -- cgit From 1e75b3d874973dd71ea74b158ebeb501d9ac68a3 Mon Sep 17 00:00:00 2001 From: Reverite Date: Fri, 20 Sep 2019 18:18:22 -0700 Subject: Fix link footer component --- Dockerfile | 2 +- .../glitch/features/ui/components/link_footer.js | 38 ++-------------------- config/webpacker.yml | 2 +- 3 files changed, 5 insertions(+), 37 deletions(-) (limited to 'Dockerfile') diff --git a/Dockerfile b/Dockerfile index 9ad80c0de..359126f3a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -115,7 +115,7 @@ ENV BIND="0.0.0.0" USER mastodon # Precompile assets -RUN cd ~ && OTP_SECRET=_ SECRET_KEY_BASE=_ rails assets:precompile && yarn cache clean +RUN cd ~ && OTP_SECRET=_ SECRET_KEY_BASE=_ rails assets:precompile --trace && yarn cache clean # Empty temporary files USER root diff --git a/app/javascript/flavours/glitch/features/ui/components/link_footer.js b/app/javascript/flavours/glitch/features/ui/components/link_footer.js index 04a2e9761..71291fae9 100644 --- a/app/javascript/flavours/glitch/features/ui/components/link_footer.js +++ b/app/javascript/flavours/glitch/features/ui/components/link_footer.js @@ -4,38 +4,6 @@ import PropTypes from 'prop-types'; import { FormattedMessage, defineMessages, injectIntl } from 'react-intl'; import { Link } from 'react-router-dom'; import { invitesEnabled, version, repository, source_url } from 'flavours/glitch/util/initial_state'; -<<<<<<< HEAD -import { signOutLink } from 'flavours/glitch/util/backend_links'; - -const LinkFooter = () => ( -
-
    - {invitesEnabled &&
  • ·
  • } -
  • ·
  • -
  • ·
  • -
  • ·
  • -
  • ·
  • -
  • ·
  • -
  • ·
  • -
  • -
- -

- pluralcafe/mastodon (v{version}), - Glitchsoc: glitch-soc/mastodon, - Mastodon: Mastodon }} - /> -

-
-); - -LinkFooter.propTypes = { -}; -======= import { signOutLink, securityLink } from 'flavours/glitch/util/backend_links'; import { logOut } from 'flavours/glitch/util/log_out'; import { openModal } from 'flavours/glitch/actions/modal'; @@ -63,7 +31,6 @@ class LinkFooter extends React.PureComponent { onLogout: PropTypes.func.isRequired, intl: PropTypes.object.isRequired, }; ->>>>>>> glitch handleLogoutClick = e => { e.preventDefault(); @@ -91,9 +58,10 @@ class LinkFooter extends React.PureComponent {

glitch-soc/mastodon (v{version}), + github: pluralcafe/mastodon (v{version}), + Glitchsoc: glitch-soc/mastodon, Mastodon: Mastodon }} />

diff --git a/config/webpacker.yml b/config/webpacker.yml index 9accd6152..a80144b92 100644 --- a/config/webpacker.yml +++ b/config/webpacker.yml @@ -7,7 +7,7 @@ default: &default public_output_path: packs cache_path: tmp/cache/webpacker check_yarn_integrity: false - webpack_compile_output: false + webpack_compile_output: true # Additional paths webpack should lookup modules # ['app/assets', 'engine/foo/app/assets'] -- cgit