Skip to content

Commit 2ccc0d9

Browse files
authored
Feat docker (#4)
* feat: docker build * fix: flow not in pr merge * docs: fix up readme * fix: bug on Docker metadata * docs: updates
1 parent 0d7ee19 commit 2ccc0d9

File tree

1 file changed

+49
-19
lines changed

1 file changed

+49
-19
lines changed

README.md

Lines changed: 49 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,26 @@
1-
# CGate Server
1+
# Clipsal C-Gate Server Docker Container
22

3-
This docker image installs the Clipsal CGate Server for use with CBus appliances.
3+
The Clipsal C-Gate Server is a powerful utility designed to interface with the Clipsal PLC system, connecting via either serial or network connections. This repository provides a Dockerized version of the C-Gate Server, enabling convenient deployment and management of the server within a containerized environment. The C-Gate Server acts as a bridge between the Clipsal PLC system and other devices, facilitating seamless communication.
44

5-
## Install
5+
## Purpose
66

7-
Here are some example snippets to help you get started creating a container.
7+
The primary purpose of this project is to encapsulate the Clipsal C-Gate Server within a Docker container, allowing users to deploy the server effortlessly on various platforms. By leveraging Docker's isolation and management capabilities, this solution simplifies the installation and usage of the C-Gate Server, making it an ideal choice for users looking to connect and interact with the Clipsal PLC system.
88

9-
### Docker
9+
## Features
10+
11+
- **Flexible Connectivity:** The C-Gate Server offers support for both serial and network connections, providing a versatile interface to the Clipsal PLC system.
12+
- **Dockerized Deployment:** The provided Dockerfile enables the creation of a containerized instance of the C-Gate Server, making setup and configuration straightforward.
13+
- **Customizable Configuration:** The container supports customization through configuration files, allowing users to tailor the server's behavior to their specific needs.
14+
15+
## Usage
16+
17+
To utilize the Dockerized `cgate-server` container, follow these steps:
18+
19+
1. **Build the Docker Image:**
20+
21+
```bash
22+
docker build -t cgate-server .
23+
```
1024

1125
The container supports the following parameters
1226

@@ -21,7 +35,10 @@ The container supports the following parameters
2135
| `-v :/tag` | CGate tag directory (XML project files go here) |
2236
| `-v :/logs` | CGate logs directory |
2337

24-
Example usage
38+
39+
### Docker
40+
41+
Start the container directly with the following example
2542

2643
```
2744
docker create \
@@ -38,11 +55,11 @@ docker create \
3855
steppinghat/cgate-server
3956
```
4057

41-
### docker-compose
58+
### Docker Compose:**
4259

43-
Compatible with docker-compose v3 schemas
60+
Create a Docker Compose file (`docker-compose.yml`):
4461

45-
```
62+
```yaml
4663
version: '3.8'
4764

4865
x-disabled:
@@ -52,7 +69,7 @@ services:
5269
# CNI Serial port (RS232 to USB) to TCP 10001
5370
ser2sock:
5471
hostname: "ser2sock"
55-
image: ser2sock:latest
72+
image: ghcr.io/damianflynn/ser2sock:latest
5673
container_name: ser2sock
5774
restart: unless-stopped
5875
networks:
@@ -70,7 +87,7 @@ services:
7087
# Clipsal C-Bus C-Gate Server
7188
cgate-server:
7289
hostname: "cgate-server"
73-
image: cgate-server:latest
90+
image: ghcr.io/damianflynn/cgate-server:latest
7491
container_name: cgate-server
7592
depends_on:
7693
- ser2sock
@@ -95,16 +112,21 @@ networks:
95112
external: true
96113
```
97114
98-
### Version tags
115+
Run the Docker Compose:
99116
100-
| Tag | Description |
101-
| --- | ----------- |
102-
| latest | Releases from the latest stable branch |
103-
| 2.11 | Releases from the 2.11.x branch |
104-
117+
```bash
118+
docker-compose up -d
119+
```
105120

121+
## Accessing the C-Gate Server:**
106122

107-
## Usage
123+
Once the container is running, you can access the Clipsal C-Gate Server via the defined ports (e.g., 20023, 20024, etc.). The server will act as an intermediary, managing communication between the Clipsal PLC system and external devices.
124+
125+
## Configuration and Persistence
126+
127+
The C-Gate Server configuration and associated data are persisted using Docker volumes. Customize your server's behavior by modifying the configuration files found in the `/opt/appdata/cbus/config` volume on your host.
128+
129+
#### Toolkit Project
108130

109131
Easy installation can be achieved if you already have the XML version of the C-Bus Toolkit project file.
110132
Place this file in the `/tag` directory; In my example the location on storage is `/opt/appdata/cbus/tags`
@@ -115,7 +137,7 @@ Place this file in the `/tag` directory; In my example the location on storage i
115137
```
116138
117139
118-
### C-Gate Access Control file
140+
#### C-Gate Access Control file
119141
120142
Access to the server is governed by a file named `access.txt`
121143
If this file does not already exist, create it in your mapped`/config` folder, as you defined in your docker configuration.
@@ -146,3 +168,11 @@ remote 172.16.100.10 Program
146168
```
147169

148170
In my example the final line is my windows machine which runs C-Bus toolkit when i need to work on the system
171+
172+
## Troubleshooting
173+
174+
If you encounter any issues, ensure that your configuration settings and Docker Compose file match your specific hardware setup and requirements.
175+
176+
## Conclusion
177+
178+
By containerizing the Clipsal C-Gate Server using Docker, this project empowers users to effortlessly deploy, manage, and utilize the server for seamless communication with the Clipsal PLC system. This containerized approach enhances flexibility and simplifies deployment, enabling users to connect to the Clipsal system with ease and efficiency.

0 commit comments

Comments
 (0)