This repository has been archived by the owner on May 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Fixed #28 -- Added a command for generating a basic LXDock file * Removed uneccessary usage of codecs.open and mocked os.getcwd instead of os.path.exists
- Loading branch information
Showing
6 changed files
with
154 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,7 @@ help for a specifc subcommand. For example: | |
destroy | ||
halt | ||
help | ||
init | ||
provision | ||
shell | ||
status | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
lxdock init | ||
=========== | ||
|
||
**Command:** ``lxdock init`` | ||
|
||
This command can be used to generate a LXDock file containing highlights regarding some useful | ||
options. | ||
|
||
Options | ||
------- | ||
|
||
* ``--image`` - this option allows to use a specific container image in the generated configuration | ||
* ``--project`` - this option allows to define the name of the project that will appear in the LXDock file | ||
* ``--force`` or ``-f`` - this option allows to overwrite an exsting LXDock file if any | ||
|
||
Examples | ||
-------- | ||
|
||
.. code-block:: console | ||
$ lxdock init # generates a basic LXDock file | ||
$ lxdock init --image debian/jessie # generates a LXDock file defining a debian/jessie container | ||
$ lxdock init --project myproject # generates a basic LXDock file defining a "myproject" project | ||
$ lxdock init --force # overwrite an existing LXDock file if applicable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# TEMPLATES | ||
# -- | ||
|
||
INIT_LXDOCK_FILE_CONTENT = """# This is a basic configuration file for LXDock. | ||
# All configuration is done through this YML file that should be placed at the root of your project. | ||
# The file define a basic LXDock project containing a single container with highlights regarding | ||
# some other useful options. | ||
name: {project_name} | ||
image: {image} | ||
# By default LXDock creates a single "default" container if you don't specify a "containers" option. | ||
# But you need the "containers" option if you have more than one container. | ||
# containers: | ||
# - name: {project_name}01 | ||
# - name: {project_name}02 | ||
# - name: {project_name}02 | ||
# Most of the options can be redefined for each container definition, eg. the "image" option: | ||
# image: archlinux | ||
# You can use the "provisioning" option to define provisioning tools that should be used to | ||
# provision your containers. For example, you could use Ansible as follows: | ||
# provisioning: | ||
# - type: ansible | ||
# playbook: deploy/site.yml | ||
# A common need is to access your project folder in your containers. To do this you can use the | ||
# "shares" option: | ||
# shares: | ||
# - source: . | ||
# dest: /myshare | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters