mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2025-11-27 04:46:54 -05:00
new docker-based build
This replaces the previous Dockerfile, which was a single stage for building and deployment. The new one is a multi-stage build. Its "dev" target has the full development environment; its "deploy" target is more slim. It supports cross-compiled builds via BuildKit, eg to prepare a build suitable for a Raspberry Pi: docker buildx build --load --platform=linux/arm64/v8 --tag=moonfire-nvr --progress=plain --target=deploy -f docker/Dockerfile . Coming next: updating the installation docs.
This commit is contained in:
13
db/build.rs
13
db/build.rs
@@ -28,11 +28,14 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
fn main() {
|
||||
protobuf_codegen_pure::Codegen::new()
|
||||
.out_dir(".")
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
Ok(protobuf_codegen_pure::Codegen::new()
|
||||
.out_dir(std::env::var("OUT_DIR")?)
|
||||
.inputs(&["proto/schema.proto"])
|
||||
.include("proto")
|
||||
.run()
|
||||
.expect("protoc");
|
||||
.customize(protobuf_codegen_pure::Customize {
|
||||
gen_mod_rs: Some(true),
|
||||
..Default::default()
|
||||
})
|
||||
.run()?)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user