dockerize_sidekick_plugin

Creator: coderz1093

Last updated:

0 purchases

dockerize_sidekick_plugin Image
dockerize_sidekick_plugin Images

Languages

Categories

Add to Cart

Description:

dockerize sidekick plugin

dockerize_sidekick_plugin #


A plugin for sidekick CLIs.
Description #
This plugin for sidekick wants to make it as easy as possible to deploy your flutter web app as a docker container.
Installation #
Kickstart #
with having docker and sidekick installed
<<your_cli>> sidekick plugins install dockerize_sidekick_plugin
<<your_cli>> docker run
copied to clipboard
Docker #
To run this locally you need Docker installed on your machine.
The commands #
Install the plugin
<<your_cli>> sidekick plugins install dockerize_sidekick_plugin
copied to clipboard
Build the Docker Image
There are multiple build commands available for this plugin. Here is a brief overview:

<<your_cli>> docker build app: Runs a basic Flutter build web command
<<your_cli>> docker build image: Builds the Docker image and also executes the app
You can choose between different environments using the --env flag. The default environment is dev. You can customize the build process in the commands/build folder.

Run the Docker Image Locally
To run the Docker image locally, use the following command:
<<your_cli>> docker run
copied to clipboard
This will run the app and make it accessible at localhost:8000.
Notice:
A hot-reload is enabled, which will rerun the required build commands if you change a file. You can detach and kill the container by pressing Ctrl + C.

-p, --port: Specifies the port on which the app is accessible.
The build command can choose between different environments. The default environment is dev. You can change the environment with the --env flag.

Stop the container
<<your_cli>> docker stop
copied to clipboard
Deploy the docker image
Deploying the docker image depends on the environment you are deploying to.
Here are the official guides for the biggest cloud providers:

AWS
Azure
Google Cloud Run

Further reading #
Environments
By default we are generating a very simple way of handling different environments.
You can change the environments in the commands/docker/environment.dart file.
Build args
You can easily pass arguments to your docker file.
To do this you can just pass the build args into the createDockerImage function in the commands/docker/build_image_command.dart file.
Script hashes
By default we are generating script hashes for each script tag in your index.html file.
You can change the hashtype or disable it in the commands/docker/build_command.dart file.
CSP Rules
By default we are adding a default Set of CSP rules to the server/bin/middlewares.dart File.
You can change the rules or disable them in the commands/docker/build_command.dart file.
You can find more informations about CSP Rules here.
Docker Garbage Collection
We are currently collecting all dangling images and containers after the build process to keep your docker environment clean.
If you dont want to have this Feature feel free to open an Issue.
Help #
If you need help, you can always use the help command.
<<your_cli>> docker --help
copied to clipboard
Issues and Feedback #
Feel free to open an issue or send a pull request.
License #
Copyright 2023 Justin Baumann, Robin Schönau

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
copied to clipboard

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.