diff --git a/ansible/VERSION b/ansible/VERSION index e31dcbc42..2c4784f16 100644 --- a/ansible/VERSION +++ b/ansible/VERSION @@ -1 +1 @@ -v0.6.71 +v0.6.73 diff --git a/docker/prod/docker-compose.yml b/docker/prod/docker-compose.yml index db6e40045..bbf2a6985 100644 --- a/docker/prod/docker-compose.yml +++ b/docker/prod/docker-compose.yml @@ -12,7 +12,7 @@ services: restart: always lemmy: - image: dessalines/lemmy:v0.6.71 + image: dessalines/lemmy:v0.6.73 ports: - "127.0.0.1:8536:8536" restart: always diff --git a/docs/src/contributing_local_development.md b/docs/src/contributing_local_development.md index e823c9d1b..f801caf32 100644 --- a/docs/src/contributing_local_development.md +++ b/docs/src/contributing_local_development.md @@ -1,31 +1,61 @@ -#### Requirements +### Ubuntu -- [Rust](https://www.rust-lang.org/) -- [Yarn](https://yarnpkg.com/en/) -- [Postgres](https://www.postgresql.org/) -#### Set up Postgres DB +#### Build requirements: +``` +sudo apt install git cargo libssl-dev pkg-config libpq-dev yarn curl gnupg2 git +# install yarn +curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - +echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list +sudo apt update && sudo apt install yarn +``` -```bash +#### Get the source code +``` +git clone https://github.com/LemmyNet/lemmy.git +# or alternatively from gitea +# git clone https://yerbamate.dev/LemmyNet/lemmy.git +``` + +All the following commands need to be run either in `lemmy/server` or `lemmy/ui`, as indicated +by the `cd` command. + +#### Build the backend (Rust) +``` cd server -./db-init.sh +cargo build +# for development, use `cargo check` instead) ``` -Or run the commands manually: +#### Build the frontend (Typescript) +``` +cd ui +yarn +yarn build +``` -```bash -psql -c "create user lemmy with password 'password' superuser;" -U postgres -psql -c 'create database lemmy with owner lemmy;' -U postgres +#### Setup postgresql +``` +sudo apt install postgresql +sudo systemctl start postgresql +# initialize postgres database +sudo -u postgres psql -c "create user lemmy with password 'password' superuser;" -U postgres +sudo -u postgres psql -c 'create database lemmy with owner lemmy;' -U postgres export LEMMY_DATABASE_URL=postgres://lemmy:password@localhost:5432/lemmy +# or execute server/db-init.sh ``` -#### Running - -```bash -git clone https://github.com/LemmyNet/lemmy -cd lemmy -./install.sh -# For live coding, where both the front and back end, automagically reload on any save, do: -# cd ui && yarn start -# cd server && cargo watch -x run +#### Run a local development instance ``` +# run each of these in a seperate terminal +cd server && cargo run +ui & yarn start +``` + +Then open [localhost:4444](http://localhost:4444) in your browser. It will auto-refresh if you edit +any frontend files. For backend coding, you will have to rerun `cargo run`. You can use +`cargo check` as a faster way to find compilation errors. + +Note that this setup doesn't include image uploads or link previews (provided by pict-rs and +iframely respectively). If you want to test those, you should use the +[Docker development](contributing_docker_development.md). diff --git a/server/src/version.rs b/server/src/version.rs index 354b86b40..e3c8ca572 100644 --- a/server/src/version.rs +++ b/server/src/version.rs @@ -1 +1 @@ -pub const VERSION: &str = "v0.6.71"; +pub const VERSION: &str = "v0.6.73"; diff --git a/ui/src/components/login.tsx b/ui/src/components/login.tsx index 84014f68c..ce04d0d4f 100644 --- a/ui/src/components/login.tsx +++ b/ui/src/components/login.tsx @@ -111,6 +111,7 @@ export class Login extends Component { required />