Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 708df34

Browse files
committedNov 20, 2024
♻️Removed unused docker files + docker compose file with all dependencies
1 parent 386bfaa commit 708df34

9 files changed

+225
-568
lines changed
 

‎.github/workflows/build.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ jobs:
4646
- name: Prettier code style check
4747
run: |
4848
cd tdrive
49-
docker compose -f docker-compose.tests.yml run -e NODE_OPTIONS=--unhandled-rejections=warn node npm run lint:prettier
49+
docker compose -f docker-compose.dev.deps.yml -f docker-compose.tests.yml run -e NODE_OPTIONS=--unhandled-rejections=warn node npm run lint:prettier
5050
- name: Lint
5151
run: |
5252
cd tdrive
53-
docker compose -f docker-compose.tests.yml run -e NODE_OPTIONS=--unhandled-rejections=warn node npm run lint
53+
docker compose -f docker-compose.dev.deps.yml -f docker-compose.tests.yml run -e NODE_OPTIONS=--unhandled-rejections=warn node npm run lint
5454
5555
test-backend:
5656
runs-on: ubuntu-latest
@@ -62,16 +62,16 @@ jobs:
6262
- name: e2e-mongo-s3-test
6363
run: |
6464
cd tdrive
65-
docker compose -f docker-compose.tests.yml run --rm -e NODE_OPTIONS=--unhandled-rejections=warn node npm run test:all
66-
docker compose -f docker-compose.tests.yml down
65+
docker compose -f docker-compose.dev.deps.yml -f docker-compose.tests.yml run --rm -e NODE_OPTIONS=--unhandled-rejections=warn node npm run test:all
66+
docker compose -f docker-compose.dev.deps.yml -f docker-compose.tests.yml down
6767
- name: e2e-opensearch-test
6868
run: |
6969
cd tdrive
70-
docker compose -f docker-compose.dev.tests.opensearch.yml up -d --force-recreate opensearch-node1 postgres node
70+
docker compose -f docker-compose.dev.deps.yml -f docker-compose.dev.tests.opensearch.yml up -d --force-recreate opensearch-node1 postgres node
7171
sleep 60
72-
docker compose -f docker-compose.dev.tests.opensearch.yml logs
73-
docker compose -f docker-compose.dev.tests.opensearch.yml run -e NODE_OPTIONS=--unhandled-rejections=warn -e SEARCH_DRIVER=opensearch -e DB_DRIVER=postgres -e PUBSUB_TYPE=local node npm run test:all
74-
docker compose -f docker-compose.dev.tests.opensearch.yml down
72+
docker compose -f docker-compose.dev.deps.yml -f docker-compose.dev.tests.opensearch.yml logs
73+
docker compose -f docker-compose.dev.deps.yml -f docker-compose.dev.tests.opensearch.yml run -e NODE_OPTIONS=--unhandled-rejections=warn -e SEARCH_DRIVER=opensearch -e DB_DRIVER=postgres -e PUBSUB_TYPE=local node npm run test:all
74+
docker compose -f docker-compose.dev.deps.yml -f docker-compose.dev.tests.opensearch.yml down
7575
7676
build-frontend:
7777
runs-on: ubuntu-latest

‎tdrive/backend/node/test/e2e/files/storage.oneof.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ describe("The OneOf Storage feature", () => {
1616
services: ["webserver", "database", "storage", "files", "previews"],
1717
});
1818
helpers = await UserApi.getInstance(platform);
19-
}, 300000000);
19+
});
2020

2121
afterEach(async () => {
2222
jest.restoreAllMocks();

‎tdrive/docker-compose.dev.deps.yml

+144
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
services:
2+
3+
postgres:
4+
image: postgres
5+
restart: always
6+
environment:
7+
POSTGRES_DB: tdrive
8+
POSTGRES_PASSWORD: tdrive_secret
9+
POSTGRES_USER: tdrive_user
10+
ports:
11+
- "5432:5432"
12+
networks:
13+
- tdrive_network
14+
15+
mongo:
16+
container_name: mongo
17+
image: mongo
18+
ports:
19+
- 27017:27017
20+
healthcheck:
21+
test: echo 'db.runCommand("ping").ok' | mongosh localhost:27017/test --quiet
22+
networks:
23+
- tdrive_network
24+
25+
redis:
26+
image: "redis:alpine"
27+
command: redis-server --requirepass some_password
28+
ports:
29+
- "6379:6379"
30+
environment:
31+
- REDIS_REPLICATION_MODE=master
32+
networks:
33+
- tdrive_network
34+
35+
minio:
36+
image: minio/minio
37+
ports:
38+
- "9000:9000"
39+
volumes:
40+
- ./test/.minio/data:/export
41+
- ./test/.minio/config:/root/.minio
42+
environment:
43+
- MINIO_ROOT_USER=admin
44+
- MINIO_ROOT_PASSWORD=adminminio
45+
command: server /export
46+
healthcheck:
47+
test: MC_HOST_custom=http://localhost:9000 mc ready local
48+
networks:
49+
- tdrive_network
50+
51+
createbucket:
52+
image: minio/mc
53+
depends_on:
54+
minio:
55+
condition: service_healthy
56+
entrypoint: >
57+
/bin/sh -c "
58+
/usr/bin/mc config host add myminio http://minio:9000 admin adminminio;
59+
/usr/bin/mc rm -r --force myminio/drive;
60+
/usr/bin/mc mb myminio/drive;
61+
exit 0;
62+
"
63+
networks:
64+
- tdrive_network
65+
66+
elasticsearch:
67+
image: docker.elastic.co/elasticsearch/elasticsearch:7.13.4
68+
environment:
69+
- xpack.security.enabled=false
70+
- bootstrap.memory_lock=true
71+
- discovery.type=single-node
72+
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
73+
healthcheck:
74+
test: curl --write-out 'HTTP %{http_code}' --fail --silent --output /dev/null http://localhost:9200/
75+
ulimits:
76+
memlock:
77+
soft: -1
78+
hard: -1
79+
ports:
80+
- 9200:9200
81+
networks:
82+
- tdrive_network
83+
84+
rabbitmq:
85+
image: rabbitmq:management
86+
hostname: rabbitmq
87+
container_name: rabbitmq
88+
environment:
89+
- RABBITMQ_DEFAULT_USER=guest
90+
- RABBITMQ_DEFAULT_PASS=guest
91+
healthcheck:
92+
test: rabbitmq-diagnostics -q ping
93+
ports:
94+
- "5672:5672"
95+
- "15672:15672"
96+
volumes:
97+
- ./.docker-conf/rabbitmq/data/:/var/lib/rabbitmq/
98+
- ./.docker-conf/rabbitmq/log/:/var/log/rabbitmq
99+
networks:
100+
- tdrive_network
101+
102+
onlyoffice:
103+
image: docker.io/onlyoffice/documentserver
104+
ports:
105+
- 8090:80
106+
environment:
107+
- AMQP_URI=amqp://guest:guest@rabbitmq
108+
- JWT_ENABLED=false
109+
depends_on:
110+
- rabbitmq
111+
volumes:
112+
- ./onlyoffice_data:/var/www/onlyoffice/Data
113+
networks:
114+
- tdrive_network
115+
116+
opensearch-node1:
117+
image: opensearchproject/opensearch:2.11.0 # Specifying the latest available image - modify if you want a specific version
118+
container_name: opensearch-node1
119+
environment:
120+
- cluster.name=opensearch-cluster # Name the cluster
121+
- node.name=opensearch-node1 # Name the node that will run in this container
122+
- discovery.seed_hosts=opensearch-node1 # Nodes to look for when discovering the cluster
123+
- cluster.initial_cluster_manager_nodes=opensearch-node1 # Nodes eligible to serve as cluster manager
124+
- bootstrap.memory_lock=true # Disable JVM heap memory swapping
125+
# - OPENSEARCH_INITIAL_ADMIN_PASSWORD=admin
126+
- "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m" # Set min and max JVM heap sizes to at least 50% of system RAM
127+
ulimits:
128+
memlock:
129+
soft: -1 # Set memlock to unlimited (no soft or hard limit)
130+
hard: -1
131+
nofile:
132+
soft: 65536 # Maximum number of open files for the opensearch user - set to at least 65536
133+
hard: 65536
134+
# volumes:˚
135+
# - opensearch-data1:/usr/share/opensearch/data # Creates volume called opensearch-data1 and mounts it to the container
136+
ports:
137+
- 9200:9200 # REST API
138+
- 9600:9600 # Performance Analyzer
139+
networks:
140+
- tdrive_network
141+
142+
networks:
143+
tdrive_network:
144+
driver: bridge

‎tdrive/docker-compose.dev.minio.yml

-156
This file was deleted.

‎tdrive/docker-compose.dev.mongo.yml

-136
This file was deleted.

‎tdrive/docker-compose.dev.rabbitmq.yml

-166
This file was deleted.

‎tdrive/docker-compose.dev.tests.opensearch.yml

+2-36
Original file line numberDiff line numberDiff line change
@@ -4,42 +4,6 @@ version: "3.4"
44

55
services:
66

7-
opensearch-node1:
8-
image: opensearchproject/opensearch:2.11.0 # Specifying the latest available image - modify if you want a specific version
9-
container_name: opensearch-node1
10-
environment:
11-
- cluster.name=opensearch-cluster # Name the cluster
12-
- node.name=opensearch-node1 # Name the node that will run in this container
13-
- discovery.seed_hosts=opensearch-node1 # Nodes to look for when discovering the cluster
14-
- cluster.initial_cluster_manager_nodes=opensearch-node1 # Nodes eligible to serve as cluster manager
15-
- bootstrap.memory_lock=true # Disable JVM heap memory swapping
16-
# - OPENSEARCH_INITIAL_ADMIN_PASSWORD=admin
17-
- "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m" # Set min and max JVM heap sizes to at least 50% of system RAM
18-
ulimits:
19-
memlock:
20-
soft: -1 # Set memlock to unlimited (no soft or hard limit)
21-
hard: -1
22-
nofile:
23-
soft: 65536 # Maximum number of open files for the opensearch user - set to at least 65536
24-
hard: 65536
25-
# volumes:
26-
# - opensearch-data1:/usr/share/opensearch/data # Creates volume called opensearch-data1 and mounts it to the container
27-
ports:
28-
- 9200:9200 # REST API
29-
# - 9600:9600 # Performance Analyzer
30-
# networks:
31-
# - opensearch-net # All of the containers will join the same Docker bridge network
32-
33-
postgres:
34-
image: postgres
35-
restart: always
36-
environment:
37-
POSTGRES_DB: tdrive
38-
POSTGRES_PASSWORD: tdrive_secret
39-
POSTGRES_USER: tdrive_user
40-
ports:
41-
- "5432:5432"
42-
437
node:
448
# Use the build context in the current directory
459
build:
@@ -69,3 +33,5 @@ services:
6933
links:
7034
- postgres
7135
- opensearch-node1
36+
networks:
37+
- tdrive_network
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
version: "3.4"
2+
3+
services:
4+
5+
node:
6+
build:
7+
context: .
8+
dockerfile: docker/tdrive-node/Dockerfile
9+
target: development
10+
container_name: tdrive-node
11+
hostname: tdrive_node
12+
ports:
13+
- 4000:4000
14+
- 9229:9229
15+
environment:
16+
- DEV=dev
17+
- SEARCH_DRIVER=mongodb
18+
- DB_DRIVER=mongodb
19+
- PUBSUB_TYPE=amqp
20+
- SERVICES_LIST=[ "webserver", "database", "tracker", "applications", "search", "storage", "message-queue", "user", "files", "auth", "documents", "counter", "cron", "general", "email-pusher" ]
21+
- ./docker-data/documents/:/storage/
22+
volumes:
23+
- ./backend/node/profiles:/usr/src/app/profiles
24+
- ./backend/node/src:/usr/src/app/src
25+
- ./docker-data/documents/:/storage/
26+
depends_on:
27+
mongo:
28+
condition: service_healthy
29+
rabbitmq:
30+
condition: service_healthy
31+
node_preview:
32+
condition: service_started
33+
links:
34+
- mongo
35+
36+
node_preview:
37+
build:
38+
context: .
39+
dockerfile: docker/tdrive-node/Dockerfile
40+
target: development
41+
container_name: tdrive-preview-node
42+
hostname: tdrive_preview_node
43+
ports:
44+
- 4001:4001
45+
- 9229:9229
46+
environment:
47+
- DEV=dev
48+
- TWAKE_DRIVE_PORT="4001"
49+
- SEARCH_DRIVER=mongodb
50+
- DB_DRIVER=mongodb
51+
- PUBSUB_TYPE=amqp
52+
- SERVICES_LIST=[ "webserver", "previews", "database", "tracker", "applications", "search", "storage", "message-queue", "user", "files", "auth", "documents", "counter", "cron", "general", "email-pusher" ]
53+
- ./docker-data/documents/:/storage/
54+
volumes:
55+
- ./backend/node/profiles:/usr/src/app/profiles
56+
- ./backend/node/src:/usr/src/app/src
57+
- ./docker-data/documents/:/storage/
58+
depends_on:
59+
mongo:
60+
condition: service_healthy
61+
rabbitmq:
62+
condition: service_healthy
63+
links:
64+
- mongo
65+
66+
67+
68+
69+
70+

‎tdrive/docker-compose.tests.yml

-65
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,12 @@
11
version: "3"
22

33
services:
4-
# rabbitmq:
5-
# image: rabbitmq:3
6-
# ports:
7-
# - 5672:5672
8-
# - 15672:15672
9-
10-
mongo:
11-
container_name: mongo
12-
image: mongo
13-
ports:
14-
- 27017:27017
15-
healthcheck:
16-
test: echo 'db.runCommand("ping").ok' | mongosh localhost:27017/test --quiet
17-
18-
redis:
19-
image: "redis:alpine"
20-
command: redis-server --requirepass some_password
21-
ports:
22-
- "6379:6379"
23-
environment:
24-
- REDIS_REPLICATION_MODE=master
25-
26-
minio:
27-
image: minio/minio
28-
ports:
29-
- "9000:9000"
30-
volumes:
31-
- ./test/.minio/data:/export
32-
- ./test/.minio/config:/root/.minio
33-
environment:
34-
- MINIO_ROOT_USER=admin
35-
- MINIO_ROOT_PASSWORD=adminminio
36-
command: server /export
37-
healthcheck:
38-
test: MC_HOST_custom=http://localhost:9000 mc ready local
39-
40-
createbucket:
41-
image: minio/mc
42-
depends_on:
43-
minio:
44-
condition: service_healthy
45-
entrypoint: >
46-
/bin/sh -c "
47-
/usr/bin/mc config host add myminio http://minio:9000 admin adminminio;
48-
/usr/bin/mc rm -r --force myminio/drive;
49-
/usr/bin/mc mb myminio/drive;
50-
exit 0;
51-
"
524

535
node:
546
image: tdrive/tdrive-node:test
557
build:
568
context: .
579
dockerfile: docker/tdrive-node/Dockerfile
58-
target: test
5910
volumes:
6011
- ./coverage/:/usr/src/app/coverage/
6112
environment:
@@ -89,22 +40,6 @@ services:
8940
- mongo
9041
# - rabbitmq
9142

92-
elasticsearch:
93-
image: docker.elastic.co/elasticsearch/elasticsearch:7.13.4
94-
environment:
95-
- xpack.security.enabled=false
96-
- bootstrap.memory_lock=true
97-
- discovery.type=single-node
98-
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
99-
healthcheck:
100-
test: curl --write-out 'HTTP %{http_code}' --fail --silent --output /dev/null http://localhost:9200/
101-
ulimits:
102-
memlock:
103-
soft: -1
104-
hard: -1
105-
ports:
106-
- 9200:9200
107-
10843
nginx:
10944
image: tdrive/tdrive-frontend
11045
ports:

0 commit comments

Comments
 (0)
Please sign in to comment.