Added devcontainers for easy development (#275)

This commit is contained in:
Prabhat Sharma
2023-03-14 11:18:52 +08:00
committed by GitHub
parent b75b11ddc5
commit 27aeb82c4b
3 changed files with 48 additions and 3 deletions
+12
View File
@@ -0,0 +1,12 @@
# FROM mcr.microsoft.com/devcontainers/base:bullseye
FROM public.ecr.aws/docker/library/rust:buster
RUN apt-get update
RUN apt-get install -y protobuf-compiler
RUN apt-get install -y cmake curl
# RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
RUN rustup toolchain install nightly-2023-01-26
RUN rustup default nightly-2023-01-26
RUN rustup target add x86_64-unknown-linux-gnu
+33
View File
@@ -0,0 +1,33 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/debian
{
"name": "Debian",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
// "image": "mcr.microsoft.com/devcontainers/base:bullseye",
"build": {
"dockerfile": "Dockerfile"
// Update 'VARIANT' to pick a Node version: 16, 14, 12.
// Append -bullseye or -buster to pin to an OS version.
// Use -bullseye variants on local arm64/Apple Silicon.
// "args": {
// "VARIANT": "bullseye"
// }
},
"features": {
"ghcr.io/devcontainers/features/node:1": {},
"ghcr.io/devcontainers/features/rust:1": {},
"devwasm.azurecr.io/dev-wasm/dev-wasm-feature/rust-wasi:0": {}
},
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [ 5080, 8081 ]
// Configure tool-specific properties.
// "customizations": {},
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
+3 -3
View File
@@ -12,6 +12,8 @@ You must have follwing installed:
2. Rust & Cargo 1.61.0 + (We recommend 1.66+),
3. nodejs v14+ and npm v6+
Alternatively you can use pre-configured devcontainer in VS code to get up and running quickly.
## Building from source code
### Lets clone the repo and get started
@@ -56,11 +58,9 @@ There are 2 areas of development.
### Server
```shell
cargo run
ZO_ROOT_USER_EMAIL=root@example.com ZO_ROOT_USER_PASSWORD=Complexpass#123 cargo run
```
Please note by default user 'admin' with password 'Complexpass#123' is created
This will start the zincobserve API server on port 5080
environment variables ZO_ROOT_USER_EMAIL and ZO_ROOT_USER_PASSWORD can be used first time to configure default admin user when zincobserve is started.