Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**/node_modules
46 changes: 45 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,51 @@ Thank you for your interest in contributing! While this project originated at In

## Getting Started

We recommend setting up a local development instance by following these steps:
### Developing in Docker Containers

The easiest way to get a working development environment is with Docker. This gives you an IRIS instance with git-source-control pre-installed in development mode.

#### Prerequisites

- [Docker](https://www.docker.com/get-started/) installed and running
- [VS Code](https://code.visualstudio.com/) with the [InterSystems ObjectScript Extension Pack](https://marketplace.visualstudio.com/items?itemName=intersystems-community.objectscript-pack)

#### Setup

```bash
git clone https://github.com/intersystems/git-source-control
cd git-source-control
git checkout -b <new-branch-name>
docker compose up -d --build
```

This spins up a single container:
- **git-source-control-iris-1**: an IRIS instance with git-source-control loaded in dev mode in the USER namespace. The management portal is published to the host at port 52774.

#### Important Notes

- The repository is mounted at `/home/irisowner/dev/git-source-control/` inside the container.
- If port 52774 is already in use, edit the port mapping in `docker-compose.yml`.
- If you have an InterSystems license key at `~/iris.key`, it will be mounted into the container automatically.

#### Development

Make changes locally and compile them via VS Code. To access the IRIS terminal in the container:

```bash
docker compose exec -it iris iris session iris
```

To run the unit tests from the IRIS terminal:

```
zpm "git-source-control test -only -verbose"
```

### Developing on an Existing IRIS Instance

If you prefer to use an existing IRIS installation:

1. Install an instance of IRIS (go to https://evaluation.intersystems.com/ for an evaluation kit).
2. Install IPM (InterSystems Package Manager) (https://github.com/intersystems/ipm).
3. Clone a copy of the Embedded Git repository to disk using `git clone`.
Expand Down
16 changes: 16 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
ARG BASE=containers.intersystems.com/intersystems/iris-community:2025.1

FROM ${BASE}

USER root
RUN apt-get update && apt-get install -y git nodejs npm

RUN --mount=type=bind,src=.,dst=/home/irisowner/dev/git-source-control/,rw \
chown -R irisowner:irisowner /home/irisowner/dev/git-source-control/ && \
su - irisowner -c "iris start iris" && \
su - irisowner -c "iris session IRIS < /home/irisowner/dev/git-source-control/iris.script" && \
su - irisowner -c "iris stop iris quietly"

USER irisowner


12 changes: 12 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
services:
iris:
build: .
restart: always
ports:
- 52774:52773
volumes:
- ~/iris.key:/usr/irissys/mgr/iris.key
- ./:/home/irisowner/dev/git-source-control/
command:
- -a
- iris session iris -U%SYS '##class(Security.Users).UnExpireUserPasswords("*")'
7 changes: 7 additions & 0 deletions iris.script
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
zn "USER"
// install IPM
s version="latest" s r=##class(%Net.HttpRequest).%New(),r.Server="pm.community.intersystems.com",r.SSLConfiguration="ISC.FeatureTracker.SSL.Config" d r.Get("/packages/zpm/"_version_"/installer"),$system.OBJ.LoadStream(r.HttpResponse.Data,"c")
// Load git-source-control in dev mode
zpm "load /home/irisowner/dev/git-source-control/ -dev -verbose"

halt
Loading