You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 30, 2024. It is now read-only.
Gitploy requires the use of a database backend for persistence. Gitploy uses an embedded SQLite database by default. This article provides alternate databases: MySQL and Postgres.
4
+
5
+
## MySQL
6
+
7
+
Gitploy supports mysql `5.6` and higher as the database engine. The below example demonstrates mysql database configuration. See the official driver [documentation](https://github.com/go-sql-driver/mysql#dsn-data-source-name) for more connection string details.
Gitploy supports postgres on the following 4 versions: `10`, `11`, `12` and `13`. The below example demonstrates postgres database configuration. See the official driver [documentation](https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING) for more connection string details.
Copy file name to clipboardExpand all lines: docs/tasks/installation.md
+87-12Lines changed: 87 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,15 +18,7 @@ Figure) Github OAuth
18
18
19
19

20
20
21
-
## Step 2: Download
22
-
23
-
The server is distributed as a Docker image. The image is self-contained and does not have any external dependencies. We recommend to use the last version.
24
-
25
-
```
26
-
docker pull gitployio/gitploy:0.2
27
-
```
28
-
29
-
## Step 3: Configuration
21
+
## Step 2: Configuration
30
22
31
23
The server is configured using environment variables. This article only configures with least environment. See [Configurations](../references/configurations.md) for a complete list of configuration options.
32
24
@@ -42,7 +34,15 @@ Required string value configures the GitHub OAuth client id. This is used to aut
42
34
***GITPLOY_GITHUB_CLIENT_SECRET**:
43
35
Required string value configures the GitHub OAuth client secret. This is used to authorize access to GitHub on behalf of a Gitploy user.
44
36
45
-
## Step 4: Start server
37
+
## Step 3: Start server
38
+
39
+
### Docker
40
+
41
+
The server is distributed as a Docker image. The image is self-contained and does not have any external dependencies. We recommend to use the last version.
42
+
43
+
```
44
+
docker pull gitployio/gitploy:0.3
45
+
```
46
46
47
47
The server container can be started with the below command. The container is configured through environment variables.
48
48
@@ -58,5 +58,80 @@ docker run \
58
58
--restart=always \
59
59
--detach=true \
60
60
--name=gitploy \
61
-
gitployio/gitploy:0.2
62
-
```
61
+
gitployio/gitploy:0.3
62
+
```
63
+
64
+
### Kubernetes
65
+
66
+
The server can be started in Kubernetes with the below artifacts. The container is configured through environment variables.
67
+
68
+
And we’re also support the official Helm chart to install the server, check [here](https://github.com/gitploy-io/helm-chart) for details.
69
+
70
+
<details>
71
+
<summary>Kubernetes YAML</summary>
72
+
73
+
```yaml
74
+
apiVersion: v1
75
+
kind: Service
76
+
metadata:
77
+
name: gitploy
78
+
labels:
79
+
app.kubernetes.io/name: gitploy
80
+
spec:
81
+
type: ClusterIP
82
+
ports:
83
+
- port: 80
84
+
targetPort: http
85
+
protocol: TCP
86
+
name: http
87
+
selector:
88
+
app.kubernetes.io/name: gitploy
89
+
---
90
+
apiVersion: apps/v1
91
+
kind: Deployment
92
+
metadata:
93
+
name: gitploy
94
+
labels:
95
+
app.kubernetes.io/name: gitploy
96
+
spec:
97
+
replicas: 1
98
+
selector:
99
+
matchLabels:
100
+
app.kubernetes.io/name: gitploy
101
+
template:
102
+
metadata:
103
+
labels:
104
+
app.kubernetes.io/name: gitploy
105
+
spec:
106
+
containers:
107
+
- name: gitploy-server
108
+
image: "gitployio/gitploy:0.3"
109
+
imagePullPolicy: IfNotPresent
110
+
ports:
111
+
- name: http
112
+
containerPort: 80
113
+
protocol: TCP
114
+
# Fill out values of environments
115
+
env:
116
+
- name: GITPLOY_SERVER_HOST
117
+
value: ""
118
+
- name: GITPLOY_SERVER_PROTO
119
+
value: ""
120
+
- name: GITPLOY_GITHUB_CLIENT_ID
121
+
value: ""
122
+
- name: GITPLOY_GITHUB_CLIENT_SECRET
123
+
value: ""
124
+
```
125
+
</details>
126
+
127
+
## Pro tips
128
+
129
+
### Persistence
130
+
131
+
Gitploy uses an embedded SQLite database by default, and it stores all of the data in a single file. For persistence, you have to attach the volume to the path of the database (i.e., [GITPLOY_STORE_SOURCE](../references/GITPLOY_STORE_SOURCE.md)) in the container. You can check the [example](https://docs.docker.com/get-started/05_persisting_data/#persist-the-todo-data) on how to mount the volume in Docker.
132
+
133
+
And if you need alternative database, MySQL and Postgres, you should check the [database](database.md) documentation.
134
+
135
+
### Security
136
+
137
+
The server receives the webhook through the internet, and it could be a security issue. So you probably want to limit requests to those coming from GitHub. To ensure your server is only receiving the expected GitHub request, you must configure the secret token. You can configure it by [GITPLOY_WEBHOOK_SECRET](../references/GITPLOY_WEBHOOK_SECRET.md).
0 commit comments