Skip to content

Commit 1498dc9

Browse files
committed
Initial commit.
0 parents  commit 1498dc9

18 files changed

Lines changed: 799 additions & 0 deletions

LICENSE

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# DUAL LICENSE AGREEMENT
2+
3+
This software is available under two distinct licenses. All use must comply strictly with the terms set forth below.
4+
5+
---
6+
7+
## NON-COMMERCIAL LICENSE (MIT-BASED)
8+
9+
### **Strictly Limited to Non-Commercial Use**
10+
11+
Copyright (c) 2025 LibOps, LLC.
12+
13+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, **provided such use is strictly Non-Commercial** and subject to the following conditions:
14+
15+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
16+
17+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
18+
19+
This license applies **ONLY** to the following categories of **Non-Commercial Users**:
20+
21+
* ✅ 501(c)(3) and other registered non-profit organizations
22+
* ✅ Educational institutions (schools, universities, libraries)
23+
* ✅ Personal/hobby use (non-commercial, non-revenue generating)
24+
25+
---
26+
27+
## COMMERCIAL LICENSE
28+
29+
Any use of the Software by a for-profit entity or any revenue-generating application is **strictly prohibited** without a separate, valid Commercial License Agreement from LibOps, LLC.
30+
31+
This prohibition includes (but is not limited to):
32+
33+
* For-profit corporations, LLCs, and businesses of any size.
34+
* Use by consultants, contractors, or freelancers providing services for a fee.
35+
* SaaS providers, cloud services, and managed service offerings.
36+
* **Any internal or external use** that directly or indirectly supports a commercial or revenue-generating activity.
37+
38+
---
39+
40+
## © COPYRIGHT NOTICE
41+
42+
Copyright (C) 2025 LibOps, LLC. All rights reserved.
43+
44+
Unauthorized **Commercial Use** of this Software is strictly prohibited.

Makefile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.PHONY: docs lint
2+
3+
lint:
4+
@find . -type f -name "*.tf" -exec terraform fmt {} +
5+
@find . -type f -name "*.sh" -exec shellcheck {} +
6+
7+
docs:
8+
terraform-docs markdown table --output-file README.md .
9+

README.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# cloud-compose
2+
3+
Deploy a docker compose project to a Google Cloud Compute Instance.
4+
5+
6+
<!-- BEGIN_TF_DOCS -->
7+
## Requirements
8+
9+
| Name | Version |
10+
|------|---------|
11+
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.2.4 |
12+
| <a name="requirement_google"></a> [google](#requirement\_google) | ~> 7.0 |
13+
14+
## Providers
15+
16+
| Name | Version |
17+
|------|---------|
18+
| <a name="provider_cloudinit"></a> [cloudinit](#provider\_cloudinit) | 2.3.7 |
19+
| <a name="provider_google"></a> [google](#provider\_google) | 7.12.0 |
20+
21+
## Modules
22+
23+
| Name | Source | Version |
24+
|------|--------|---------|
25+
| <a name="module_ppb"></a> [ppb](#module\_ppb) | git::https://github.com/libops/terraform-cloudrun-v2 | 0.4.0 |
26+
27+
## Resources
28+
29+
| Name | Type |
30+
|------|------|
31+
| [google_artifact_registry_repository_iam_member.private-policy-cloud-compose](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/artifact_registry_repository_iam_member) | resource |
32+
| [google_compute_disk.boot](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_disk) | resource |
33+
| [google_compute_disk.data](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_disk) | resource |
34+
| [google_compute_instance.cloud-compose](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_instance) | resource |
35+
| [google_project_iam_member.gce-start](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/project_iam_member) | resource |
36+
| [google_project_iam_member.gce-suspend](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/project_iam_member) | resource |
37+
| [google_project_iam_member.log](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/project_iam_member) | resource |
38+
| [google_project_iam_member.stackdriver](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/project_iam_member) | resource |
39+
| [google_service_account.cloud-compose](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/service_account) | resource |
40+
| [google_service_account.ppb](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/service_account) | resource |
41+
| [google_service_account_iam_member.gsa-user](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/service_account_iam_member) | resource |
42+
| [google_service_account_iam_member.token-creator](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/service_account_iam_member) | resource |
43+
| [cloudinit_config.ci](https://registry.terraform.io/providers/hashicorp/cloudinit/latest/docs/data-sources/config) | data source |
44+
| [google_project_iam_custom_role.gce-start](https://registry.terraform.io/providers/hashicorp/google/latest/docs/data-sources/project_iam_custom_role) | data source |
45+
| [google_project_iam_custom_role.gce-suspend](https://registry.terraform.io/providers/hashicorp/google/latest/docs/data-sources/project_iam_custom_role) | data source |
46+
47+
## Inputs
48+
49+
| Name | Description | Type | Default | Required |
50+
|------|-------------|------|---------|:--------:|
51+
| <a name="input_allowed_ips"></a> [allowed\_ips](#input\_allowed\_ips) | CIDR IP Addresses allowed to turn on this site's GCP instance | `list(string)` | `[]` | no |
52+
| <a name="input_disk_size_gb"></a> [disk\_size\_gb](#input\_disk\_size\_gb) | Data disk size in GB | `number` | `25` | no |
53+
| <a name="input_docker_compose_branch"></a> [docker\_compose\_branch](#input\_docker\_compose\_branch) | git branch to checkout for var.docker\_compose\_repo | `string` | `"main"` | no |
54+
| <a name="input_docker_compose_down"></a> [docker\_compose\_down](#input\_docker\_compose\_down) | Command to stop the docker compose project | `string` | `"docker compose down"` | no |
55+
| <a name="input_docker_compose_init"></a> [docker\_compose\_init](#input\_docker\_compose\_init) | After cloning the docker compose git repo, any initialization that needs to happen before the docker compose project can start | `string` | `""` | no |
56+
| <a name="input_docker_compose_repo"></a> [docker\_compose\_repo](#input\_docker\_compose\_repo) | git repo to checkout that contains a docker compose project | `string` | n/a | yes |
57+
| <a name="input_docker_compose_up"></a> [docker\_compose\_up](#input\_docker\_compose\_up) | Command to start the docker compose project | `string` | `"docker compose up --remove-orphans"` | no |
58+
| <a name="input_machine_type"></a> [machine\_type](#input\_machine\_type) | VM machine type | `string` | `"e2-medium"` | no |
59+
| <a name="input_name"></a> [name](#input\_name) | The site name | `string` | n/a | yes |
60+
| <a name="input_os"></a> [os](#input\_os) | The host OS to install on the GCP instance | `string` | `"cos-117-18613-439-28"` | no |
61+
| <a name="input_project_id"></a> [project\_id](#input\_project\_id) | libops project ID (logical identifier, not GCP project ID) | `string` | n/a | yes |
62+
| <a name="input_project_number"></a> [project\_number](#input\_project\_number) | The GCP project to use | `string` | n/a | yes |
63+
| <a name="input_region"></a> [region](#input\_region) | GCP region for resources | `string` | `"us-central1"` | no |
64+
| <a name="input_zone"></a> [zone](#input\_zone) | GCP zone for resources | `string` | `"us-central1-f"` | no |
65+
66+
## Outputs
67+
68+
| Name | Description |
69+
|------|-------------|
70+
| <a name="output_gsaEmail"></a> [gsaEmail](#output\_gsaEmail) | n/a |
71+
| <a name="output_gsaId"></a> [gsaId](#output\_gsaId) | n/a |
72+
| <a name="output_instance_id"></a> [instance\_id](#output\_instance\_id) | n/a |
73+
| <a name="output_name"></a> [name](#output\_name) | n/a |
74+
| <a name="output_zone"></a> [zone](#output\_zone) | n/a |
75+
<!-- END_TF_DOCS -->

0 commit comments

Comments
 (0)