diff --git a/.drone.yml b/.drone.yml index 425736600..807d6c991 100644 --- a/.drone.yml +++ b/.drone.yml @@ -8,12 +8,6 @@ platform: steps: - - name: fetch git submodules - image: node:15-alpine3.12 - commands: - - apk add git - - git submodule update --init --recursive --remote - - name: chown repo image: ekidd/rust-musl-builder:1.47.0 user: root @@ -108,12 +102,6 @@ platform: steps: - - name: fetch git submodules - image: node:15-alpine3.12 - commands: - - apk add git - - git submodule update --init --recursive --remote - - name: cargo test image: rust:1.47-slim-buster environment: diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 90f9e09f8..000000000 --- a/.gitmodules +++ /dev/null @@ -1,4 +0,0 @@ -[submodule "docs"] - path = docs - url = https://github.com/LemmyNet/lemmy-docs - branch = main diff --git a/.rgignore b/.rgignore new file mode 100644 index 000000000..d1b811b7d --- /dev/null +++ b/.rgignore @@ -0,0 +1 @@ +*.sql diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 41032a8c3..20f331b79 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,4 +1,4 @@ # Contributing -See [here](https://lemmy.ml/docs/contributing.html) for contributing Instructions. +See [here](https://join.lemmy.ml/docs/en/contributing/contributing.html) for contributing Instructions. diff --git a/README.md b/README.md index d80fffa1b..f8b593a14 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@
Join Lemmy · - Documentation + Documentation · Report Bug · @@ -29,7 +29,7 @@ · Releases · - Code of Conduct + Code of Conduct

@@ -68,7 +68,7 @@ Each Lemmy server can set its own moderation policy; appointing site-wide admins - Open source, [AGPL License](/LICENSE). - Self hostable, easy to deploy. - - Comes with [Docker](https://lemmy.ml/docs/en/administration/install_docker.html) and [Ansible](https://lemmy.ml/docs/en/administration/install_ansible.html). + - Comes with [Docker](https://join.lemmy.ml/docs/en/administration/install_docker.html) and [Ansible](https://join.lemmy.ml/docs/en/administration/install_ansible.html). - Clean, mobile-friendly interface. - Only a minimum of a username and password is required to sign up! - User avatar support. @@ -103,8 +103,8 @@ Each Lemmy server can set its own moderation policy; appointing site-wide admins ## Installation -- [Docker](https://lemmy.ml/docs/en/administration/install_docker.html) -- [Ansible](https://lemmy.ml/docs/en/administration/install_ansible.html) +- [Docker](https://join.lemmy.ml/docs/en/administration/install_docker.html) +- [Ansible](https://join.lemmy.ml/docs/en/administration/install_ansible.html) ## Lemmy Projects @@ -137,9 +137,9 @@ Lemmy is free, open-source software, meaning no advertising, monetizing, or vent ## Contributing -- [Contributing instructions](https://lemmy.ml/docs/en/contributing/contributing.html) -- [Docker Development](https://lemmy.ml/docs/en/contributing/docker_development.html) -- [Local Development](https://lemmy.ml/docs/en/contributing/local_development.html) +- [Contributing instructions](https://join.lemmy.ml/docs/en/contributing/contributing.html) +- [Docker Development](https://join.lemmy.ml/docs/en/contributing/docker_development.html) +- [Local Development](https://join.lemmy.ml/docs/en/contributing/local_development.html) ### Translations diff --git a/RELEASES.md b/RELEASES.md index 217ff9756..fe566657c 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -76,10 +76,10 @@ None of these are breaking changes, so federation between 0.9.0 and 0.8.11 will ## Upgrading -If you'd like to make a DB backup before upgrading, follow [this guide](https://lemmy.ml/docs/en/administration/backup_and_restore.html). +If you'd like to make a DB backup before upgrading, follow [this guide](https://join.lemmy.ml/docs/en/administration/backup_and_restore.html). -- [Upgrade with manual Docker installation](https://lemmy.ml/docs/en/administration/install_docker.html#updating) -- [Upgrade with Ansible installation](https://lemmy.ml/docs/en/administration/install_ansible.html) +- [Upgrade with manual Docker installation](https://join.lemmy.ml/docs/en/administration/install_docker.html#updating) +- [Upgrade with Ansible installation](https://join.lemmy.ml/docs/en/administration/install_ansible.html) # Lemmy v0.8.0 Release (2020-10-16) @@ -103,7 +103,7 @@ Here are some of the bigger changes: - The first **federation public beta release**, woohoo :fireworks: - All Lemmy functionality now works over ActivityPub (except turning remote users into mods/admins) - Instance allowlist and blocklist -- Documentation for [admins](https://lemmy.ml/docs/administration_federation.html) and [devs](https://lemmy.ml/docs/contributing_federation_overview.html) on how federation works +- Documentation for [admins](https://join.lemmy.ml/docs/administration_federation.html) and [devs](https://join.lemmy.ml/docs/contributing_federation_overview.html) on how federation works - Upgraded to newest versions of @asonix activitypub libraries - Full local federation setup for manual testing - Automated testing for nearly every federation action @@ -141,8 +141,8 @@ We'd also like to thank both the [NLnet foundation](https://nlnet.nl/) for their ## Upgrading -- [with manual Docker installation](https://lemmy.ml/docs/administration_install_docker.html#updating) -- [with Ansible installation](https://lemmy.ml/docs/administration_install_ansible.html) +- [with manual Docker installation](https://join.lemmy.ml/docs/administration_install_docker.html#updating) +- [with Ansible installation](https://join.lemmy.ml/docs/administration_install_ansible.html) ## Testing Federation @@ -230,7 +230,7 @@ Overall, since our last major release in January (v0.6.0), we have closed over Before starting the upgrade, make sure that you have a working backup of your database and image files. See our -[documentation](https://lemmy.ml/docs/administration_backup_and_restore.html) +[documentation](https://join.lemmy.ml/docs/administration_backup_and_restore.html) for backup instructions. **With Ansible:** diff --git a/ansible/templates/config.hjson b/ansible/templates/config.hjson index 134b01656..29da81c34 100644 --- a/ansible/templates/config.hjson +++ b/ansible/templates/config.hjson @@ -1,6 +1,6 @@ { # for more info about the config, check out the documentation - # https://lemmy.ml/docs/administration_configuration.html + # https://join.lemmy.ml/docs/en/administration/configuration.html # settings related to the postgresql database database: { @@ -26,7 +26,7 @@ # whether to enable activitypub federation. enabled: false # Allows and blocks are described here: - # https://lemmy.ml/docs/administration_federation.html#instance-allowlist-and-blocklist + # https://join.lemmy.ml/docs/en/federation/administration.html#instance-allowlist-and-blocklist # # comma separated list of instances with which federation is allowed # allowed_instances: "" diff --git a/ansible/templates/nginx.conf b/ansible/templates/nginx.conf index 84b9c6656..675925a20 100644 --- a/ansible/templates/nginx.conf +++ b/ansible/templates/nginx.conf @@ -78,7 +78,7 @@ server { } # backend - location ~ ^/(api|docs|pictrs|feeds|nodeinfo|.well-known) { + location ~ ^/(api|pictrs|feeds|nodeinfo|.well-known) { proxy_pass http://0.0.0.0:{{ lemmy_port }}; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; diff --git a/config/defaults.hjson b/config/defaults.hjson index 86502ec93..6c6a68fc2 100644 --- a/config/defaults.hjson +++ b/config/defaults.hjson @@ -35,8 +35,6 @@ tls_enabled: true # json web token for authorization between server and client jwt_secret: "changeme" - # path to built documentation - docs_dir: "/app/documentation" # address where pictrs is available pictrs_url: "http://pictrs:8080" # address where iframely is available @@ -65,7 +63,7 @@ # whether to enable activitypub federation. enabled: false # Allows and blocks are described here: - # https://lemmy.ml/docs/administration_federation.html#instance-allowlist-and-blocklist + # https://join.lemmy.ml/docs/en/federation/administration.html#instance-allowlist-and-blocklist # # comma separated list of instances with which federation is allowed allowed_instances: "" diff --git a/crates/utils/src/settings.rs b/crates/utils/src/settings.rs index 4877d46b3..8301dcee4 100644 --- a/crates/utils/src/settings.rs +++ b/crates/utils/src/settings.rs @@ -2,7 +2,7 @@ use crate::location_info; use anyhow::Context; use config::{Config, ConfigError, Environment, File}; use serde::Deserialize; -use std::{env, fs, io::Error, net::IpAddr, path::PathBuf, sync::RwLock}; +use std::{env, fs, io::Error, net::IpAddr, sync::RwLock}; static CONFIG_FILE_DEFAULTS: &str = "config/defaults.hjson"; static CONFIG_FILE: &str = "config/config.hjson"; @@ -15,7 +15,6 @@ pub struct Settings { pub bind: IpAddr, pub port: u16, pub tls_enabled: bool, - pub docs_dir: PathBuf, pub jwt_secret: String, pub pictrs_url: String, pub iframely_url: String, diff --git a/docker/dev/Dockerfile b/docker/dev/Dockerfile index 292ff903d..a2712f9f2 100644 --- a/docker/dev/Dockerfile +++ b/docker/dev/Dockerfile @@ -43,15 +43,6 @@ RUN strip ./target/$CARGO_BUILD_TARGET/$RUSTRELEASEDIR/lemmy_server RUN cp ./target/$CARGO_BUILD_TARGET/$RUSTRELEASEDIR/lemmy_server /app/lemmy_server -# Build the docs -FROM $RUST_BUILDER_IMAGE as docs -WORKDIR /app -RUN cargo install mdbook --git https://github.com/Nutomic/mdBook.git \ - --branch localization --rev 0982a82 --force -COPY --chown=rust:rust docs ./docs -RUN ls -la docs/ -RUN mdbook build docs/ - # The alpine runner FROM alpine:3.12 as lemmy @@ -67,7 +58,6 @@ RUN adduser -D -s /bin/sh -u 1000 -G lemmy lemmy # Copy resources COPY --chown=lemmy:lemmy config/defaults.hjson /config/defaults.hjson COPY --chown=lemmy:lemmy --from=builder /app/lemmy_server /app/lemmy -COPY --chown=lemmy:lemmy --from=docs /app/docs/book/ /app/documentation/ RUN chown lemmy:lemmy /app/lemmy USER lemmy diff --git a/docker/dev/volume_mount.dockerfile b/docker/dev/volume_mount.dockerfile index a6724a868..3bb0b81d5 100644 --- a/docker/dev/volume_mount.dockerfile +++ b/docker/dev/volume_mount.dockerfile @@ -15,13 +15,6 @@ RUN --mount=type=cache,target=/usr/local/cargo/registry \ RUN --mount=type=cache,target=/app/target \ cp target/debug/lemmy_server lemmy_server -FROM rust:1.47-buster as docs -WORKDIR /app -RUN cargo install mdbook --git https://github.com/Nutomic/mdBook.git \ - --branch localization --rev 0982a82 --force -COPY docs ./docs -RUN mdbook build docs/ - FROM ubuntu:20.10 # Install libpq for postgres and espeak @@ -31,7 +24,6 @@ RUN apt-get install -y libpq-dev espeak # Copy resources COPY config/defaults.hjson /config/defaults.hjson COPY --from=rust /app/lemmy_server /app/lemmy -COPY --from=docs /app/docs/book/ /app/documentation/ EXPOSE 8536 CMD ["/app/lemmy"] diff --git a/docker/federation/nginx.conf b/docker/federation/nginx.conf index 357b87c90..8bf2ed7f2 100644 --- a/docker/federation/nginx.conf +++ b/docker/federation/nginx.conf @@ -17,7 +17,7 @@ http { # Upload limit for pictshare client_max_body_size 50M; - location ~ ^/(api|docs|pictrs|feeds|nodeinfo|.well-known) { + location ~ ^/(api|pictrs|feeds|nodeinfo|.well-known) { proxy_pass http://lemmy-alpha; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; @@ -62,7 +62,7 @@ http { # Upload limit for pictshare client_max_body_size 50M; - location ~ ^/(api|docs|pictrs|feeds|nodeinfo|.well-known) { + location ~ ^/(api|pictrs|feeds|nodeinfo|.well-known) { proxy_pass http://lemmy-beta; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; @@ -107,7 +107,7 @@ http { # Upload limit for pictshare client_max_body_size 50M; - location ~ ^/(api|docs|pictrs|feeds|nodeinfo|.well-known) { + location ~ ^/(api|pictrs|feeds|nodeinfo|.well-known) { proxy_pass http://lemmy-gamma; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; @@ -152,7 +152,7 @@ http { # Upload limit for pictshare client_max_body_size 50M; - location ~ ^/(api|docs|pictrs|feeds|nodeinfo|.well-known) { + location ~ ^/(api|pictrs|feeds|nodeinfo|.well-known) { proxy_pass http://lemmy-delta; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; @@ -197,7 +197,7 @@ http { # Upload limit for pictshare client_max_body_size 50M; - location ~ ^/(api|docs|pictrs|feeds|nodeinfo|.well-known) { + location ~ ^/(api|pictrs|feeds|nodeinfo|.well-known) { proxy_pass http://lemmy-epsilon; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; diff --git a/docker/lemmy.hjson b/docker/lemmy.hjson index 2d9bfa358..bea65d8f9 100644 --- a/docker/lemmy.hjson +++ b/docker/lemmy.hjson @@ -1,6 +1,6 @@ { # for more info about the config, check out the documentation - # https://lemmy.ml/docs/administration_configuration.html + # https://join.lemmy.ml/docs/en/administration/configuration.html setup: { # username for the admin user diff --git a/docker/prod/Dockerfile b/docker/prod/Dockerfile index 34921161b..8f307bf60 100644 --- a/docker/prod/Dockerfile +++ b/docker/prod/Dockerfile @@ -43,14 +43,6 @@ RUN strip ./target/$CARGO_BUILD_TARGET/$RUSTRELEASEDIR/lemmy_server RUN cp ./target/$CARGO_BUILD_TARGET/$RUSTRELEASEDIR/lemmy_server /app/lemmy_server -# Build the docs -FROM $RUST_BUILDER_IMAGE as docs -WORKDIR /app -RUN cargo install mdbook --git https://github.com/Nutomic/mdBook.git \ - --branch localization --rev 0982a82 --force -COPY --chown=rust:rust docs ./docs -RUN mdbook build docs/ - # The alpine runner FROM alpine:3.12 as lemmy @@ -66,7 +58,6 @@ RUN adduser -D -s /bin/sh -u 1000 -G lemmy lemmy # Copy resources COPY --chown=lemmy:lemmy config/defaults.hjson /config/defaults.hjson COPY --chown=lemmy:lemmy --from=builder /app/lemmy_server /app/lemmy -COPY --chown=lemmy:lemmy --from=docs /app/docs/book/ /app/documentation/ RUN chown lemmy:lemmy /app/lemmy USER lemmy diff --git a/docker/prod/Dockerfile.arm b/docker/prod/Dockerfile.arm index e451fc56f..bcf590034 100644 --- a/docker/prod/Dockerfile.arm +++ b/docker/prod/Dockerfile.arm @@ -19,13 +19,6 @@ RUN strip ./target/release/lemmy_server RUN cp ./target/release/lemmy_server /app/lemmy_server -# Build the docs -FROM $RUST_BUILDER_IMAGE as docs -WORKDIR /app -RUN cargo install mdbook --git https://github.com/Nutomic/mdBook.git --branch localization --rev 0982a82 --force -COPY docs ./docs -RUN mdbook build docs/ - # The Debian runner FROM debian:buster-slim as lemmy @@ -40,7 +33,6 @@ RUN adduser --no-create-home --shell /bin/sh --uid 1000 --gid 1000 lemmy # Copy resources COPY --chown=lemmy:lemmy config/defaults.hjson /config/defaults.hjson COPY --chown=lemmy:lemmy --from=builder /app/lemmy_server /app/lemmy -COPY --chown=lemmy:lemmy --from=docs /app/docs/book/ /app/documentation/ RUN chown lemmy:lemmy /app/lemmy USER lemmy diff --git a/docs b/docs deleted file mode 160000 index cf3236bb6..000000000 --- a/docs +++ /dev/null @@ -1 +0,0 @@ -Subproject commit cf3236bb620048897048027d8cdff34401ad85ee diff --git a/src/main.rs b/src/main.rs index f00f724a6..1f7b36f61 100644 --- a/src/main.rs +++ b/src/main.rs @@ -92,7 +92,6 @@ async fn main() -> Result<(), LemmyError> { .configure(|cfg| images::config(cfg, &rate_limiter)) .configure(nodeinfo::config) .configure(webfinger::config) - .service(actix_files::Files::new("/docs", Settings::get().docs_dir)) }) .bind((settings.bind, settings.port))? .run()