Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
d5e70e8
feat: for web
braswelljr Jul 11, 2023
13984ab
chore: update gitignore
braswelljr Jul 11, 2023
1884dda
Merge branch 'main' into web
braswelljr Jul 11, 2023
8be7d42
chore: adding a page header
braswelljr Jul 12, 2023
f12a2ba
chore: another addons
braswelljr Jul 13, 2023
a959de8
chore: another addons
braswelljr Jul 13, 2023
da82807
feat: add fetch to handle response
braswelljr Jul 14, 2023
366e694
feat: add docs for commands
braswelljr Jul 14, 2023
9e472c7
feat: linting
braswelljr Jul 14, 2023
dfd4044
Merge branch 'main' into web
braswelljr Jul 14, 2023
ddae053
chore: add request
braswelljr Jul 14, 2023
61d0682
Merge branch 'main' into web
profclems Jul 15, 2023
ff1ef0b
chore: parser for result
braswelljr Jul 15, 2023
4def6ac
Merge branch 'web' of https://github.com/profclems/compozify into web
braswelljr Jul 15, 2023
92249f4
fix: enable build for static files
braswelljr Jul 15, 2023
47dc06a
web: change build dir to dist
profclems Jul 16, 2023
79df227
web: override opentelemetry dependency versions using pnpm
profclems Jul 16, 2023
6e419dd
fix: distDir for development and production
braswelljr Jul 16, 2023
5884cd4
fix: commit for dist/* files
braswelljr Jul 16, 2023
6d2404a
web: remove generated static files
profclems Jul 17, 2023
e74cbf5
.gitignore: ignore files in web/dist
profclems Jul 17, 2023
bd274f9
fix: solve theme conflicts and description
braswelljr Jul 17, 2023
630f26c
internal/version: fix isdev method
profclems Jul 17, 2023
2b93bec
web: keep the empty dist folder
profclems Jul 17, 2023
4189bfa
Merge branch 'main' into web
profclems Jul 17, 2023
ce730b8
fix: reroute docs
braswelljr Jul 17, 2023
e1ef373
Merge branch 'web' of https://github.com/profclems/compozify into web
braswelljr Jul 17, 2023
1a13891
api: some refactoring
profclems Jul 28, 2023
8e57d31
.github/workflows: fix deploy action
profclems Jul 28, 2023
6a58813
.github/workflows: fix deploy action
profclems Jul 28, 2023
72b48f2
.github/workflows: fix deploy action 2
profclems Jul 28, 2023
1374498
.github/workflows: fix deploy action 3
profclems Jul 28, 2023
14b148a
add LICENSE
profclems Jul 28, 2023
02ff475
ignore changelog file
profclems Jul 28, 2023
d2dc99d
.github/workflows: fix deploy action
profclems Jul 28, 2023
55708a7
scripts: add installer scripts
profclems Jul 29, 2023
7c02e00
scripts: move installer to base
profclems Jul 29, 2023
5521e40
Merge branch 'main' into web
profclems Jul 29, 2023
7e2dde2
fix: spacing and width
braswelljr Jul 29, 2023
8fa65ce
Merge branch 'web' of https://github.com/profclems/compozify into web
braswelljr Jul 29, 2023
faed3ad
fix: fonts
braswelljr Jul 29, 2023
c2cc425
fix: fonts
braswelljr Jul 29, 2023
98ed2b5
fix: doc links
braswelljr Jul 29, 2023
3a26505
fix: dependency to resolve build errors
braswelljr Jul 29, 2023
f0318d8
fix: dependency to resolve build errors
braswelljr Jul 29, 2023
21195d6
Merge branch 'main' into web
braswelljr Jul 30, 2023
bb5ab3c
fix: keep dist for actions
braswelljr Jul 30, 2023
269b4f7
fix: keep dist for actions
braswelljr Jul 30, 2023
e73db7f
fix: add .gitignore
braswelljr Aug 7, 2023
78e7b0a
Merge branch 'main' into web
braswelljr Aug 7, 2023
aa96158
fix: add highlighting to generated yaml
braswelljr Aug 8, 2023
d39219b
fix: localhost for development
braswelljr Aug 9, 2023
876d51c
Merge branch 'main' into web
braswelljr Aug 12, 2023
8b8bf14
fix: dist for web
braswelljr Aug 12, 2023
c1f5277
fix: dist for web
braswelljr Aug 12, 2023
d32901f
fix: dist for web
braswelljr Aug 12, 2023
59c47c5
fix: typing
braswelljr Aug 20, 2023
3263455
fix: typing
braswelljr Aug 20, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,5 @@ compose.yml
yarn.lock
package-lock.json
pnpm-lock.yaml

!web/dist/.gitkeep
5 changes: 1 addition & 4 deletions web/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,4 @@ pnpm-lock.yaml


# Contentlayer
.contentlayer

# commit directory dist with content for github pages
/dist
.contentlayer
32 changes: 30 additions & 2 deletions web/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,42 @@ cd compozify/web

### DEVELOPMENT

Install dependencies:
#### Install dependencies

```bash
pnpm install
```

Start the development server:
#### Start the backend server

##### Prerequisites

- [Go 1.18+](https://golang.org/dl/)

##### Run the server

Open a new terminal and route to `cmd/compozify-web` and run:

```bash
go run main.go
```

#### Start the development server

In `compozify/web/next.config.js` file

1. Enable comment the `async rewrites()` function.

2. Disable comment the `output: 'export'` function.

Then run the following command:

```bash
pnpm dev
```

**NB**:

- Make sure you have the backend server running in another terminal in order to make requests to the API endpoints.

- Return the `async rewrites()` function and the `output: 'export'` function to its initial state before building the app for production or making commits.
71 changes: 71 additions & 0 deletions web/content/docs/commands/compozify-add-service.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
---
title: compozify add-service
description: Add a service to an existing docker-compose file
---

# compozify add-service

Add a service to an existing docker-compose file

## Synopsis

Converts the docker run command to docker compose and adds as a new service to an existing docker-compose file.
If no file is specified, compozify will look for a docker compose file in the current directory.
If no file is found, compozify will create one in the current directory.
Expected file names are docker-compose.[yml,yaml], compose.[yml,yaml]

```bash
compozify add-service [flags] DOCKER_RUN_COMMAND
```

## Examples

- Add service to existing docker-compose file in current directory

```bash
compozify add-service "docker run -i -t --rm alpine"
```

- Add service to existing docker-compose file

```bash
compozify add-service -f /path/to/docker-compose.yml "docker run -i -t --rm alpine"
```

- Write to file

```bash
compozify add-service -w -f /path/to/docker-compose.yml "docker run -i -t --rm alpine"
```

- Alternative usage specifying beginning of docker run command without quotes

```bash
compozify add-service -w -f /path/to/docker-compose.yml -- docker run -i -t --rm alpine
```

- Add service with custom name

```bash
compozify add-service -w -f /path/to/docker-compose.yml -n my-service "docker run -i -t --rm alpine"
```

## Options

```bash
-f, --file string Compose file path
-h, --help help for add-service
-n, --service-name string Name of the service
-w, --write write to file
```

### Options inherited from parent commands

```bash
-v, --verbose verbose output
```

### SEE ALSO

- <CustomLink href="/docs/commands/compozify">compozify</CustomLink> - compozify is a tool mainly for converting docker run
commands to docker compose files
18 changes: 18 additions & 0 deletions web/content/docs/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,24 @@ description: Helps with the installation of the tool

Download a binary suitable for your OS at the [releases page](https://github.com/profclems/compozify/releases/latest).

## Quick install

### Linux and macOS

```sh
curl -sfL https://raw.githubusercontent.com/profclems/compozify/main/install.sh | sh
```

### Windows (PowerShell)

Open a PowerShell terminal (version 5.1 or later) and run:

```powershell
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser # Optional: Needed to run a remote script the first time

irm https://raw.githubusercontent.com/profclems/compozify/main/install.ps1 | iex
```

## From source

### Prerequisites for building from source
Expand Down
2 changes: 1 addition & 1 deletion web/contentlayer.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { getHighlighter, loadTheme } from 'shiki'
import { visit } from 'unist-util-visit'

import { rehypeComponent } from './lib/rehype-component'
import { UnistNode, UnistTree } from './lib/unist'
import { UnistNode, UnistTree } from './lib/toc'

/** @type {import('contentlayer/source-files').ComputedFields} */
const computedFields: import('contentlayer/source-files').ComputedFields = {
Expand Down
2 changes: 1 addition & 1 deletion web/lib/rehype-component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { u } from 'unist-builder'
import { visit } from 'unist-util-visit'

import { languages } from './rehype-languages'
import { UnistNode, UnistTree } from './unist'
import { UnistNode, UnistTree } from './toc'

export function rehypeComponent() {
return async (tree: UnistTree) => {
Expand Down
13 changes: 0 additions & 13 deletions web/lib/shiki.ts

This file was deleted.

26 changes: 25 additions & 1 deletion web/lib/toc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,31 @@ import { toc } from 'mdast-util-toc'
import { remark } from 'remark'
import { visit } from 'unist-util-visit'

import { UnistNode } from './unist'
type Node = import('unist').Node

export interface UnistNode extends Node {
url?: string
type: string
name?: string
tagName?: string
value?: string
properties?: {
__rawString__?: string
__className__?: string
className?: string[]
[key: string]: unknown
}
attributes?: {
name: string
value: unknown
type?: string
}[]
children?: UnistNode[]
}

export interface UnistTree extends Node {
children: UnistNode[]
}

const textTypes = ['text', 'emphasis', 'strong', 'inlineCode']

Expand Down
25 changes: 0 additions & 25 deletions web/lib/unist.ts

This file was deleted.

7 changes: 4 additions & 3 deletions web/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ const nextConfig = {
output: 'export',
distDir: process.env.NODE_ENV === 'development' ? 'out' : 'dist',
images: { unoptimized: true },
experimental: {
serverComponentsExternalPackages: ['vscode-oniguruma', 'shiki']
},
webpack: (config, { defaultLoaders }) => {
// clear cache
defaultLoaders.babel.options.cache = false
Expand All @@ -25,6 +22,10 @@ const nextConfig = {

return config
}
// for local development - (\\d{1,}) is for port number
// async rewrites() {
// return [{ source: '/api/parse', destination: 'http://localhost:8080/api/parse' }]
// }
}

const withALL = (nextConfig = {}) => withContentlayer(withPWA(nextConfig))
Expand Down
47 changes: 24 additions & 23 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,27 @@
"@radix-ui/react-dropdown-menu": "^2.0.5",
"@radix-ui/react-scroll-area": "^1.0.4",
"@radix-ui/react-separator": "^1.0.3",
"@types/node": "20.4.1",
"@types/react": "18.2.14",
"@types/react-dom": "18.2.6",
"autoprefixer": "10.4.14",
"class-variance-authority": "^0.6.1",
"clsx": "^1.2.1",
"@types/node": "20.5.1",
"@types/react": "18.2.20",
"@types/react-dom": "18.2.7",
"autoprefixer": "10.4.15",
"class-variance-authority": "^0.7.0",
"clsx": "^2.0.0",
"concurrently": "^8.2.0",
"contentlayer": "^0.3.4",
"framer-motion": "^10.12.18",
"framer-motion": "^10.16.0",
"highlight.js": "^11.8.0",
"mdast-util-toc": "^7.0.0",
"next": "13.4.8",
"next": "13.4.19",
"next-contentlayer": "^0.3.4",
"next-pwa": "^5.6.0",
"next-themes": "^0.2.1",
"postcss": "8.4.25",
"postcss": "8.4.28",
"postcss-focus-visible": "^9.0.0",
"postcss-import": "^15.1.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-hook-form": "^7.45.1",
"react-hook-form": "^7.45.4",
"react-icons": "^4.10.1",
"react-intersection-observer": "^9.5.2",
"rehype-autolink-headings": "^6.1.1",
Expand All @@ -46,28 +47,28 @@
"remark-code-import": "^1.2.0",
"remark-gfm": "^3.0.1",
"shiki": "^0.14.3",
"tailwind-merge": "^1.13.2",
"tailwindcss": "3.3.2",
"tailwind-merge": "^1.14.0",
"tailwindcss": "3.3.3",
"typeit-react": "^2.6.4",
"typewriter-react": "^1.0.1",
"unist-builder": "^4.0.0",
"unist-util-visit": "^5.0.0",
"vscode-oniguruma": "^1.7.0",
"yaml": "^2.3.1",
"zustand": "^4.3.9"
"zustand": "^4.4.1"
},
"devDependencies": {
"@types/unist": "^3.0.0",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"eslint": "8.44.0",
"eslint-config-next": "13.4.9",
"eslint-config-prettier": "^8.8.0",
"@typescript-eslint/eslint-plugin": "^6.4.0",
"@typescript-eslint/parser": "^6.4.0",
"eslint": "8.47.0",
"eslint-config-next": "13.4.19",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-prettier": "^5.0.0",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"prettier": "^2.8.8",
"prettier-plugin-tailwindcss": "^0.3.0",
"prettier": "^3.0.2",
"prettier-plugin-tailwindcss": "^0.5.3",
"typescript": "5.1.6"
}
}
Loading