@@ -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
110105volumes :
111106 worklenz_postgres_data :
112107 worklenz_minio_data :
113108
109+
114110networks :
115111 worklenz :
0 commit comments