dockerize_sidekick_plugin 0.2.0 copy "dockerize_sidekick_plugin: ^0.2.0" to clipboard
dockerize_sidekick_plugin: ^0.2.0 copied to clipboard

Lets you easily generate a Docker Container for your Flutter Web App.

dockerize_sidekick_plugin 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 -b

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

Build the docker image

<<your_cli>> docker build

The build command can choose between different environments. The default environment is dev. You can change the environment with the --env flag.

You can customize the build process in the commands/docker/build_command.dart file.

Run the docker image locally

<<your_cli>> docker run

You can detach and kill the container by pressing Ctrl + C twice.

This will run your app and makes it accessible at localhost:8000. With the --background flag you can run the container in the background. With the -b, --build flag you can execute the build command before running the container. With the -p, --port flag you can specify 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

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:

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.

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.

Help #

If you need help, you can always use the help command.

<<your_cli>> docker --help

Issues and Feedback #

Feel free to open an issue or send a pull request.

License #

Copyright 2022 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.
8
likes
0
pub points
58%
popularity

Publisher

verified publisherjxstxn.dev

Lets you easily generate a Docker Container for your Flutter Web App.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

crypto, dcli, html, sidekick_core

More

Packages that depend on dockerize_sidekick_plugin