Skip to content

Commit 6038cdb

Browse files
authored
Development to Master (#141)
--Verification of user roles: Admin roles confirmed before being able to execute docker commands (i.e. running/stopping container, deleting an image, etc.) Base user roles can access data on containers but won't be able to execute commands. -- Less configuration : Users need not create an env file before running application. There are, however, multiple new configuration options where the user can pass environment variables to their docker compose file, allowing for more flexibility in how the containers are run. These will be listed in an updated Read Me shortly. --Updated dashboard: Added new subtitles to Grafana dashboard panels. Updated plugins to latest version to remove a warning message that may sometimes appear. --Code cleanup: Removed many unused files and commented out certain files that are not currently being used but may be used later. --Updated published image (docketeerx/docketeer). The newest image has already been published to the DockerHub registry. Cross-platform compatibility ensured. Tested on multiple devices without issue. --Updated docketeerx/postgres image also (new version already published to registry as well) : Added a few more commands to init sql file for optimization and republished postgres image after. Users will be required to have the latest image version to work with the current version of Docketeer. Please pull the latest image from the registry (dockteerx/postgres) or rebuild the image locally within the updated imageConfigs/postgres directory.
2 parents 8335f78 + 0d341a5 commit 6038cdb

31 files changed

+914
-811
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ src/database/docketeerdb
1010
server/database/docketeerdb
1111
dist/
1212
.env
13+
/imageConfigs/grafana/data
14+
/imageConfigs/prometheus/promData
15+
/imageConfigs/postgres/docketeerdb
1316

1417
coverage/
1518

config.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import dotenv from 'dotenv';
2+
dotenv.config();
3+
4+
export const POSTGRES_NAME = process.env.DB_NAME
5+
? process.env.DB_CONTAINER_NAME
6+
: 'docketeer-db';
7+
8+
export const POSTGRES_USER = process.env.DB_USER
9+
? process.env.DB_USER
10+
: 'postgres';
11+
export const POSTGRES_PASS = process.env.DB_PASS
12+
? process.env.DB_PASS
13+
: 'postgres';
14+
export const POSTGRES_SERVICE = process.env.DB_SERVICE_NAME
15+
? process.env.DB_SERVICE_NAME
16+
: 'db';
17+
export const JWT_SECRET = process.env.JWT_SECRET
18+
? process.env.JWT_SECRET
19+
: 'fced686ad3297c774a7c635cc3d7d33421ec0f557fda29510c6c8b7a95736dc36da9064e1fa6963f0069a29a9c1a62d799ce667dece4f3aafe9449aaed2b2302';
20+
21+
export const DASHBOARD_PORT = process.env.REACT_DASHBOARD_PORT
22+
? Number(process.env.DASHBOARD_PORT)
23+
: 2999;
24+
export const DASHBOARD_UID = process.env.REACT_REACT_DASHBOARD_ORG_ID
25+
? Number(process.env.DASHBOARD_ORG_ID)
26+
: 1;

docker-compose.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ services:
55
image: docketeerx/postgres
66
restart: always
77
ports:
8-
- '${POSTGRES_PORT}:5432'
8+
- 5432:5432
99
volumes:
1010
- ./imageConfigs/postgres/docketeerdb:/var/lib/postgresql/data/
1111

1212
environment:
13-
POSTGRES_DB: ${POSTGRES_NAME}
14-
POSTGRES_USER: ${POSTGRES_USER}
15-
POSTGRES_PASSWORD: ${POSTGRES_PASS}
13+
POSTGRES_DB: 'docketeer-db'
14+
POSTGRES_USER: 'postgres'
15+
POSTGRES_PASSWORD: 'postgres'
1616

1717
cadvisor:
1818
image: gcr.io/cadvisor/cadvisor:v0.47.1
@@ -51,8 +51,8 @@ services:
5151
container_name: prometheus
5252
ports:
5353
- '9090:9090'
54-
55-
#can add volume here to persist the prometheus data.
54+
volumes:
55+
- ./imageConfigs/prometheus/promData:/prometheus
5656
depends_on:
5757
- node-exporter
5858
labels:
@@ -86,5 +86,3 @@ services:
8686
- 4000:4000
8787
volumes:
8888
- /var/run/docker.sock:/var/run/docker.sock
89-
# depends_on:
90-
# - grafana

dockerfile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,18 @@ FROM node
33
# Set the working directory to /app
44
WORKDIR /app
55

6-
COPY package*.json ./
7-
8-
# Run npm install to install app dependencies
9-
RUN npm install
10-
11-
# Set the PATH env variable
12-
# ENV PATH="/usr/local/bin:${PATH}"
13-
# COPY /usr/local/bin/docker /usr/local/bin/docker
146
ENV DOCKERVERSION=19.03.12
7+
158
RUN curl -fsSLO https://download.docker.com/linux/static/stable/x86_64/docker-${DOCKERVERSION}.tgz \
169
&& tar xzvf docker-${DOCKERVERSION}.tgz --strip 1 -C /usr/local/bin docker/docker \
1710
&& rm docker-${DOCKERVERSION}.tgz
1811

12+
13+
COPY package*.json ./
14+
15+
# Run npm install to install app dependencies
16+
RUN npm install
17+
1918
# Copy the current directory contents into the container at /app
2019
COPY . .
2120

@@ -26,3 +25,4 @@ EXPOSE 4000
2625
CMD ["npm", "start"]
2726

2827

28+

0 commit comments

Comments
 (0)