Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
AI Tutor
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Salma Mohammed Hamed
AI Tutor
Commits
9fff7202
Commit
9fff7202
authored
Sep 17, 2025
by
SalmaMohammedHamedMustafa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
working remote image
parent
f2c43850
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
14 deletions
+17
-14
docker-compose.yml
self_hosted_env/docker-compose.yml
+4
-5
Dockerfile
self_hosted_env/voice_agent/Dockerfile
+1
-1
wait-for-postgres.sh
self_hosted_env/voice_agent/wait-for-postgres.sh
+12
-8
No files found.
self_hosted_env/docker-compose.yml
View file @
9fff7202
version
:
"
3.8"
version
:
"
3.8"
services
:
services
:
postgres
:
postgres
:
build
:
# Use the new custom image from Docker Hub
context
:
./postgres
image
:
salmamohammedhamedmustafa/postgres:latest
dockerfile
:
Dockerfile
environment
:
environment
:
POSTGRES_USER
:
${POSTGRES_USER}
POSTGRES_USER
:
${POSTGRES_USER}
POSTGRES_PASSWORD
:
${POSTGRES_PASSWORD}
POSTGRES_PASSWORD
:
${POSTGRES_PASSWORD}
...
...
self_hosted_env/voice_agent/Dockerfile
View file @
9fff7202
...
@@ -17,7 +17,7 @@ COPY . .
...
@@ -17,7 +17,7 @@ COPY . .
# Make the script executable
# Make the script executable
RUN
chmod
+x wait-for-postgres.sh
RUN
chmod
+x wait-for-postgres.sh
# Use the
script as
the entrypoint
# Use the
full path for
the entrypoint
ENTRYPOINT
["/app/wait-for-postgres.sh"]
ENTRYPOINT
["/app/wait-for-postgres.sh"]
# This is your application's original startup command
# This is your application's original startup command
...
...
self_hosted_env/voice_agent/wait-for-postgres.sh
View file @
9fff7202
#!/bin/bash
#!/bin/bash
# wait-for-postgres.sh
set
-e
set
-e
host
=
"postgres"
host
=
"postgres"
port
=
"5432"
dbname
=
"
${
POSTGRES_DB
}
"
user
=
"
${
POSTGRES_USER
}
"
user
=
"
${
POSTGRES_USER
}
"
db
=
"
${
POSTGRES_DB
}
"
password
=
"
${
POSTGRES_PASSWORD
}
"
password
=
"
${
POSTGRES_PASSWORD
}
"
echo
"Waiting for PostgreSQL..."
echo
"Waiting for PostgreSQL database to be ready..."
# Wait for the database server to be available
until
PGPASSWORD
=
"
$password
"
pg_isready
-h
"
$host
"
-U
"
$user
"
;
do
echo
"PostgreSQL server is unavailable - sleeping"
sleep
1
done
until
PGPASSWORD
=
$password
pg_isready
-h
$host
-p
$port
-U
$user
;
do
# Wait for the specific database to be available
echo
"PostgreSQL is unavailable - sleeping"
until
PGPASSWORD
=
"
$password
"
psql
-h
"
$host
"
-U
"
$user
"
-d
"
$db
"
-c
'\q'
;
do
echo
"Database '
$db
' is not yet available - sleeping"
sleep
1
sleep
1
done
done
echo
"PostgreSQL
is up
- executing command"
echo
"PostgreSQL
database is up and ready
- executing command"
exec
"
$@
"
exec
"
$@
"
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment