Skip to content

Commit

Permalink
add contribution guide on container based development flow
Browse files Browse the repository at this point in the history
  • Loading branch information
andrasbacsai committed Oct 5, 2022
1 parent 02c42a7 commit cb478e0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
12 changes: 10 additions & 2 deletions CONTRIBUTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,27 @@ First, thanks for considering to contribute to my project. It really means a lot
You can ask for guidance anytime on our Discord server in the #contribution channel.

## Setup your development environment
### Container based development flow (recommended and the easiest)
All you need is to intall [Docker Engine 20.11+](https://docs.docker.com/engine/install/) on your local machine and run `pnpm dev:container`. It will build the base image for Coolify and start the development server inside Docker. All required ports (3000, 3001) will be exposed to your host.

### Github codespaces

If you have github codespaces enabled then you can just create a codespace and run `pnpm dev` to run your the dev environment. All the required dependencies and packages has been configured for you already.

### Gitpod
1. Use [container based development flow](#container-based-development-flow-easiest)
2. Or setup your workspace manually:

Create a workspace from this repository, run `pnpm install && pnpm db:push && pnpm db:seed` and then `pnpm dev`. All the required dependencies and packages has been configured for you already.

If you have a [Gitpod](https://gitpod.io), you can just create a workspace from this repository, run `pnpm install && pnpm db:push && pnpm db:seed` and then `pnpm dev`. All the required dependencies and packages has been configured for you already.
> Some packages, just `pack` are not installed in this way. You cannot test all the features. Please use the [container based development flow](#container-based-development-flow-easiest).
### Local Machine
> At the moment, Coolify `doesn't support Windows`. You must use `Linux` or `MacOS` or consider using Gitpod or Github Codespaces.
- Due to the lock file, this repository is best with [pnpm](https://pnpm.io). I recommend you try and use `pnpm` because it is cool and efficient!
Install all the prerequisites manually to your host system. If you would not like to install anything, I suggest to use the [container based development flow](#container-based-development-flow-easiest).

- Due to the lock file, this repository is best with [pnpm](https://pnpm.io). I recommend you try and use `pnpm` because it is cool and efficient!
- You need to have [Docker Engine](https://docs.docker.com/engine/install/) installed locally.
- You need to have [Docker Compose Plugin](https://docs.docker.com/compose/install/compose-plugin/) installed locally.
- You need to have [GIT LFS Support](https://git-lfs.github.com/) installed locally.
Expand Down
6 changes: 4 additions & 2 deletions docker-compose-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ services:
build:
context: .
dockerfile: Dockerfile-dev
command: pnpm dev:container
env_file: apps/api/.env
command: bash -c 'pnpm install && pnpm db:push && pnpm db:seed && pnpm dev'
environment:
- COOLIFY_APP_ID=random-local-id
- COOLIFY_SECRET_KEY=12341234123412341234123412341234
- COOLIFY_DATABASE_URL=file:../db/dev.db
- GITPOD_WORKSPACE_URL=${GITPOD_WORKSPACE_URL}
- CODESANDBOX_HOST=${CODESANDBOX_HOST}
container_name: coolify
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"format:api": "NODE_ENV=development pnpm run --filter api format",
"lint": "run-p -l -n lint:*",
"lint:api": "NODE_ENV=development pnpm run --filter api lint",
"dev:container": "pnpm install && pnpm db:push && pnpm db:seed && pnpm dev",
"dev:container": "docker-compose -f docker-compose-dev.yaml up",
"dev": "run-p -l -n dev:api dev:ui",
"dev:api": "NODE_ENV=development pnpm run --filter api dev",
"dev:ui": "NODE_ENV=development pnpm run --filter ui dev",
Expand Down

0 comments on commit cb478e0

Please sign in to comment.