feat(deploy): compose deploy fixed
This commit is contained in:
@@ -41,4 +41,6 @@ COPY profiles ./profiles
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
CMD ["java", "-jar", "app.jar"]
|
||||
COPY entrypoint.sh .
|
||||
RUN chmod +x entrypoint.sh
|
||||
ENTRYPOINT ["./entrypoint.sh"]
|
||||
|
||||
13
backend/entrypoint.sh
Normal file
13
backend/entrypoint.sh
Normal file
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
echo "----------------------------------------------------------------"
|
||||
echo "Starting Backend Application"
|
||||
echo "DB_URL: $DB_URL"
|
||||
echo "DB_USERNAME: $DB_USERNAME"
|
||||
echo "SLICER_PATH: $SLICER_PATH"
|
||||
echo "----------------------------------------------------------------"
|
||||
|
||||
# Exec java with explicit properties from env
|
||||
exec java -jar app.jar \
|
||||
--spring.datasource.url="${DB_URL}" \
|
||||
--spring.datasource.username="${DB_USERNAME}" \
|
||||
--spring.datasource.password="${DB_PASSWORD}"
|
||||
@@ -17,7 +17,7 @@ services:
|
||||
restart: always
|
||||
volumes:
|
||||
- backend_profiles_${ENV}:/app/profiles
|
||||
command: ["sh", "-c", "echo 'DB_URL IS: $DB_URL'; java -jar app.jar --spring.datasource.url=${DB_URL} --spring.datasource.username=${DB_USERNAME} --spring.datasource.password=${DB_PASSWORD}"]
|
||||
|
||||
|
||||
frontend:
|
||||
image: ${REGISTRY_URL}/${REPO_OWNER}/print-calculator-frontend:${TAG}
|
||||
|
||||
Reference in New Issue
Block a user