Skip to content

Commit 297766c

Browse files
committed
refine conditional rendering to show message when gitconvex has not tracked repos
1 parent 1b7863f commit 297766c

File tree

3 files changed

+25
-39
lines changed

3 files changed

+25
-39
lines changed

Dockerfile

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM golang:1.15.5-alpine
22

3-
WORKDIR /opt/workroom/gitconvex
3+
WORKDIR /go/src/github.com/neel1996/gitconvex-server
44

55
COPY . .
66

@@ -14,13 +14,8 @@ RUN cd ui/ && \
1414
npx tailwindcss build -o src/index.css -c src/tailwind.config.js && \
1515
npm run build && \
1616
mv build/ gitconvex-ui/ && \
17-
mv gitconvex-ui/ ../
18-
19-
RUN cd /opt/workroom/gitconvex && \
20-
mkdir dist/ && \
21-
go build -o ./dist/ && \
22-
mv gitconvex-ui/ dist/
17+
mv gitconvex-ui/ ../
2318

2419
EXPOSE 9001
2520

26-
CMD go run /opt/workroom/gitconvex/dist/gitconvex-server
21+
CMD go run /go/src/github.com/neel1996/gitconvex-server/server.go

docker-compose.yml

Lines changed: 20 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,24 @@
1+
version: "3.3"
12
services:
23
gitconvex:
4+
build:
5+
context: .
36
container_name: gitconvex
4-
entrypoint:
5-
- go run /opt/workroom/gitconvex/dist/gitconvex-server
6-
environment:
7-
NODE_ENV: production
8-
expose:
9-
- 9001
10-
healthcheck:
11-
interval: 1m30s
12-
retries: 3
13-
test:
14-
- CMD
15-
- curl
16-
- -f
17-
- http://localhost
18-
timeout: 10s
19-
hostname: gitconvex-container
20-
image: itassistors/gitconvex:2.0.0-beta
21-
labels:
22-
generated: by 8gwifi.org
237
ports:
24-
- '9001'
25-
volumes:
26-
- primary:/opt
27-
working_dir: /opt/workroom/gitconvex
28-
version: '3'
29-
volumes:
30-
primary: null
31-
8+
- "9001:9001"
9+
networks:
10+
- gitconvex-network
11+
image: itassistors/gitconvex
12+
working_dir: /go/src/github.com/neel1996/gitconvex-server
13+
deploy:
14+
replicas: 3
15+
restart_policy:
16+
condition: on-failure
17+
delay: 5s
18+
max_attempts: 5
19+
volumes:
20+
- /:/opt
21+
entrypoint: /go/src/github.com/neel1996/gitconvex-server/dist/gitconvex-server
22+
networks:
23+
gitconvex-network:
24+
driver: bridge

ui/src/Components/DashBoard/Settings/Settings.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,11 @@ export default function Settings(props) {
105105
})
106106
.then((res) => {
107107
if (res.data.data && !res.data.error) {
108-
//DATAFILE_UPDATE_SUCCESS
109108
const updateStatus = res.data.data.updateRepoDataFile;
110109

111110
if (updateStatus === "DATAFILE_UPDATE_SUCCESS") {
112111
setDbUpdateFailed(false);
113112
setViewReload(localViewReload);
114-
window.location.reload();
115113
} else {
116114
setDbUpdateFailed(true);
117115
setViewReload(localViewReload);
@@ -289,9 +287,9 @@ export default function Settings(props) {
289287
Saved Repos
290288
</div>
291289
<>
292-
{repoDetails && repoDetails.repoId ? (
290+
{repoDetails && repoDetails.repoId && repoDetails.repoId.length ? (
293291
<>
294-
<div className="flex my-4 bg-indigo-500 my-1 w-full rounded text-white bg-white shadow p-3 font-sand text-xl font-semibold">
292+
<div className="flex my-4 bg-indigo-500 w-full rounded text-white shadow p-3 font-sand text-xl font-semibold">
295293
<div className="w-1/2 border-r text-center">Repo ID</div>
296294
<div className="w-1/2 border-r text-center">Repo Name</div>
297295
<div className="w-1/2 border-r text-center">Repo Path</div>

0 commit comments

Comments
 (0)