mirror of
https://github.com/chirpstack/chirpstack.git
synced 2025-05-02 09:03:08 +00:00
Update README + remove Vagrantfile.
This commit is contained in:
parent
3f77203516
commit
0e91779f30
6
Makefile
6
Makefile
@ -42,7 +42,11 @@ api: version
|
|||||||
build-ui:
|
build-ui:
|
||||||
docker-compose run --rm --no-deps chirpstack-ui make build
|
docker-compose run --rm --no-deps chirpstack-ui make build
|
||||||
|
|
||||||
# Enters the devshell for ChirpStack development.
|
# Enter the devshell.
|
||||||
|
devshell:
|
||||||
|
nix-shell
|
||||||
|
|
||||||
|
# Enters the Docker devshell for ChirpStack development.
|
||||||
docker-devshell:
|
docker-devshell:
|
||||||
docker-compose run --rm --service-ports --name chirpstack chirpstack
|
docker-compose run --rm --service-ports --name chirpstack chirpstack
|
||||||
|
|
||||||
|
36
README.md
36
README.md
@ -25,18 +25,25 @@ Building ChirpStack requires:
|
|||||||
|
|
||||||
#### Nix
|
#### Nix
|
||||||
|
|
||||||
Nix is used for defining the development environment which is used for local
|
Nix is used for setting up the development environment which is used for local
|
||||||
development and for creating the final binaries.
|
development and for creating the binaries.
|
||||||
|
|
||||||
If you do not have Nix installed and do not want to, then you could also look at
|
If you do not have Nix installed and do not wish to install it, then you can
|
||||||
the dependencies specified in the `shell.nix` file and install these manually.
|
use the provided Docker Compose based Nix environment. To start this environment
|
||||||
Alternatively use [Vagrant](https://www.vagrantup.com/) to setup a VM with Nix and Docker
|
execute the following command:
|
||||||
installed. See also the provided `Vagrantfile`.
|
|
||||||
|
```bash
|
||||||
|
make docker-devshell
|
||||||
|
```
|
||||||
|
|
||||||
|
**Note:** You will be able to run the test commands and run `cargo build`, but
|
||||||
|
cross-compiling will not work within this environment (because it would try start
|
||||||
|
Docker within Docker).
|
||||||
|
|
||||||
#### Docker
|
#### Docker
|
||||||
|
|
||||||
Docker is used by [cross-rs](https://github.com/cross-rs/cross) for cross-compiling,
|
Docker is used by [cross-rs](https://github.com/cross-rs/cross) for cross-compiling,
|
||||||
as well as some of the `make` commands you will find in the ChirpStack project.
|
as well as some of the `make` commands.
|
||||||
|
|
||||||
### Starting the development shell
|
### Starting the development shell
|
||||||
|
|
||||||
@ -46,6 +53,12 @@ Run the following command to start the development shell:
|
|||||||
nix-shell
|
nix-shell
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Or if you do not have Nix installed, execute the following command:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
make docker-devshell
|
||||||
|
```
|
||||||
|
|
||||||
### Building the UI
|
### Building the UI
|
||||||
|
|
||||||
To build the ChirpStack UI, execute the following command:
|
To build the ChirpStack UI, execute the following command:
|
||||||
@ -54,16 +67,13 @@ To build the ChirpStack UI, execute the following command:
|
|||||||
make build-ui
|
make build-ui
|
||||||
```
|
```
|
||||||
|
|
||||||
Note that the ChirpStack UI is built using
|
|
||||||
|
|
||||||
### Running ChirpStack tests
|
### Running ChirpStack tests
|
||||||
|
|
||||||
#### Start required services
|
#### Start required services
|
||||||
|
|
||||||
ChirpStack requires several services like PostgresQL, Redis, Mosquitto, ...
|
ChirpStack requires several services like PostgresQL, Redis, Mosquitto, ...
|
||||||
to be running before you can run the tests.
|
to be running before you can run the tests. You need to start these services
|
||||||
|
manually if you started the development shell using `nix-shell`:
|
||||||
Execute the following command to start these:
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker-compose up -d
|
docker-compose up -d
|
||||||
@ -77,7 +87,7 @@ Run the following command to run the ChirpStack tests:
|
|||||||
make test
|
make test
|
||||||
```
|
```
|
||||||
|
|
||||||
### Building ChirpStack
|
### Building ChirpStack binaries
|
||||||
|
|
||||||
Before compiling the binaries, you need to install some additional development
|
Before compiling the binaries, you need to install some additional development
|
||||||
tools (for cross-compiling, packaging, e.d.). Execute the following command:
|
tools (for cross-compiling, packaging, e.d.). Execute the following command:
|
||||||
|
38
Vagrantfile
vendored
38
Vagrantfile
vendored
@ -1,38 +0,0 @@
|
|||||||
Vagrant.configure("2") do |config|
|
|
||||||
config.vm.box = "ubuntu/jammy64"
|
|
||||||
config.vm.network "forwarded_port", guest: 8080, host: 8080
|
|
||||||
|
|
||||||
# Modify this to your needs
|
|
||||||
v.memory = 8192
|
|
||||||
v.cpus = 4
|
|
||||||
|
|
||||||
config.vm.provision "shell", inline: <<-SHELL
|
|
||||||
apt-get update
|
|
||||||
apt-get install -y \
|
|
||||||
ca-certificates \
|
|
||||||
curl \
|
|
||||||
gnupg
|
|
||||||
|
|
||||||
install -m 0755 -d /etc/apt/keyrings
|
|
||||||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
|
|
||||||
chmod a+r /etc/apt/keyrings/docker.gpg
|
|
||||||
|
|
||||||
echo \
|
|
||||||
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
|
|
||||||
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
|
|
||||||
tee /etc/apt/sources.list.d/docker.list > /dev/null
|
|
||||||
|
|
||||||
|
|
||||||
apt-get update
|
|
||||||
apt-get install -y \
|
|
||||||
docker-ce \
|
|
||||||
docker-ce-cli \
|
|
||||||
containerd.io \
|
|
||||||
docker-buildx-plugin \
|
|
||||||
docker-compose-plugin
|
|
||||||
|
|
||||||
usermod -aG docker vagrant
|
|
||||||
|
|
||||||
sh <(curl -L https://nixos.org/nix/install) --daemon
|
|
||||||
SHELL
|
|
||||||
end
|
|
Loading…
x
Reference in New Issue
Block a user