Skip to content

Commit 51767eb

Browse files
authored
Merge pull request #115 from kithmina1999/fix/minio-createbuckets-entrypoint
correct MinIO createbuckets entrypoint script syntax
2 parents 24dc99a + ad91148 commit 51767eb

2 files changed

Lines changed: 32 additions & 28 deletions

File tree

docker-compose.yml

Lines changed: 24 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ services:
1515
- worklenz
1616

1717
backend:
18-
image: docker.io/chamikajaycey/worklenz-backend:latest
18+
build:
19+
context: ./worklenz-backend
20+
dockerfile: Dockerfile
1921
container_name: worklenz_backend
2022
ports:
2123
- "3000:3000"
@@ -51,28 +53,25 @@ services:
5153
depends_on:
5254
- minio
5355
entrypoint: >
54-
/bin/sh -c "
55-
# Wait for MinIO to be available
56-
echo 'Waiting for MinIO to start...'
57-
sleep 15;
58-
# Retry up to 5 times
59-
for i in 1 2 3 4 5; do
60-
echo \"Attempt $$i to connect to MinIO...\"
61-
if /usr/bin/mc config host add myminio http://minio:9000 minioadmin minioadmin; then
62-
echo \"Successfully connected to MinIO!\"
63-
/usr/bin/mc mb --ignore-existing myminio/worklenz-bucket;
64-
/usr/bin/mc policy set public myminio/worklenz-bucket;
65-
exit 0;
66-
fi
67-
echo \"Connection failed, retrying in 5 seconds...\"
68-
sleep 5;
69-
done
70-
echo \"Failed to connect to MinIO after 5 attempts\"
71-
exit 1;
72-
"
56+
/bin/sh -c '
57+
echo "Waiting for MinIO to start...";
58+
sleep 15;
59+
for i in 1 2 3 4 5; do
60+
echo "Attempt $i to connect to MinIO...";
61+
if /usr/bin/mc config host add myminio http://minio:9000 minioadmin minioadmin; then
62+
echo "Successfully connected to MinIO!";
63+
/usr/bin/mc mb --ignore-existing myminio/worklenz-bucket;
64+
/usr/bin/mc policy set public myminio/worklenz-bucket;
65+
exit 0;
66+
fi
67+
echo "Connection failed, retrying in 5 seconds...";
68+
sleep 5;
69+
done;
70+
echo "Failed to connect to MinIO after 5 attempts";
71+
exit 1;
72+
'
7373
networks:
7474
- worklenz
75-
7675
db:
7776
image: postgres:15
7877
container_name: worklenz_db
@@ -94,22 +93,19 @@ services:
9493
target: /docker-entrypoint-initdb.d
9594
consistency: cached
9695
command: >
97-
bash -c '
98-
if command -v apt-get >/dev/null 2>&1; then
96+
bash -c ' if command -v apt-get >/dev/null 2>&1; then
9997
apt-get update && apt-get install -y dos2unix
10098
elif command -v apk >/dev/null 2>&1; then
10199
apk add --no-cache dos2unix
102-
fi &&
103-
find /docker-entrypoint-initdb.d -type f -name "*.sh" -exec sh -c '\''
100+
fi && find /docker-entrypoint-initdb.d -type f -name "*.sh" -exec sh -c '\''
104101
dos2unix "{}" 2>/dev/null || true
105102
chmod +x "{}"
106-
'\'' \; &&
107-
exec docker-entrypoint.sh postgres
108-
'
103+
'\'' \; && exec docker-entrypoint.sh postgres '
109104
110105
volumes:
111106
worklenz_postgres_data:
112107
worklenz_minio_data:
113108

109+
114110
networks:
115111
worklenz:

update-docker-env.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,14 @@ COOKIE_SECRET=change_me_in_production
8080
SOCKET_IO_CORS=${FRONTEND_URL}
8181
SERVER_CORS=${FRONTEND_URL}
8282
83+
84+
# Google Login
85+
GOOGLE_CLIENT_ID="your_google_client_id"
86+
GOOGLE_CLIENT_SECRET="your_google_client_secret"
87+
GOOGLE_CALLBACK_URL="${FRONTEND_URL}/secure/google/verify"
88+
LOGIN_FAILURE_REDIRECT="${FRONTEND_URL}/auth/authenticating"
89+
LOGIN_SUCCESS_REDIRECT="${FRONTEND_URL}/auth/authenticating"
90+
8391
# Database
8492
DB_HOST=db
8593
DB_PORT=5432

0 commit comments

Comments
 (0)