This commit is contained in:
2026-04-18 22:21:39 +03:00
parent 9f074ed8a8
commit 2b78bb84d3
11 changed files with 83 additions and 59 deletions
+2 -1
View File
@@ -5,7 +5,8 @@
#RUN microdnf install findutils
#RUN ./gradlew build -x test
FROM openjdk:24
#FROM openjdk:24
FROM eclipse-temurin:24-jdk
ADD https://download.docker.com/linux/static/stable/x86_64/docker-24.0.5.tgz /tmp/
RUN tar xzvf /tmp/docker-24.0.5.tgz -C /usr/local/bin --strip-components=1 docker/docker
+11 -11
View File
@@ -1,17 +1,17 @@
services:
jambotron:
image: 'jambotron-image'
container_name: 'jambotron-container'
container_name: 'jambotron-prod-container'
build:
context: ../../
dockerfile: ./src/DevOps/Dockerfile
ports:
# - "8081:80"
- "8443:443"
- "8081:80"
# - "8443:443"
depends_on:
- postgres_jambotron
volumes:
- certs:/certs
# - certs:/certs
- jambotron_data:/jambotron_data
# Mount host Docker socket
- /var/run/docker.sock:/var/run/docker.sock
@@ -23,10 +23,10 @@ services:
DOCKER_HOST: unix:///var/run/docker.sock
SSL_ENABLED: "true"
SERVER_PORT: 443
FULLCHAINPEM: /certs/live/jambotron.run.place/fullchain.pem
PRIVKEYPEM: /certs/live/jambotron.run.place/privkey.pem
# SSL_ENABLED: "true"
# SERVER_PORT: 443
# FULLCHAINPEM: /certs/live/jambotron.run.place/fullchain.pem
# PRIVKEYPEM: /certs/live/jambotron.run.place/privkey.pem
SPRING_DATASOURCE_URL: jdbc:postgresql://postgres_jambotron:5432/jambotronDB
SPRING_DATASOURCE_USERNAME: admin
@@ -56,7 +56,7 @@ services:
postgres_jambotron:
image: 'postgres'
container_name: 'jambotron-postgres-container'
container_name: 'jambotron-prod-postgres-container'
ports:
- "5432:5432"
environment:
@@ -71,7 +71,7 @@ services:
# db_password:
# file: db_password.txt
volumes:
certs:
external: true
# certs:
# external: true
jambotron_data:
# external: true
@@ -3,6 +3,7 @@ package com.jambotronGroup.jambotron;
import com.jambotronGroup.jambotron.fileUpload.FilesStorageService;
import jakarta.annotation.PostConstruct;
import jakarta.annotation.Resource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -11,11 +12,23 @@ import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import java.util.TimeZone;
@SpringBootApplication
public class JambotronApplication{
private static final Logger logger = LoggerFactory.getLogger(JambotronApplication.class);
public static void main(String[] args) {
// @PostConstruct
// public void init() {
// // Устанавливает UTC для всей JVM, где работает Spring
// TimeZone.setDefault(TimeZone.getTimeZone("UTC"));
// }
public static void main(String[] args) {
// Set the timezone before the Spring context (and Flyway) starts
TimeZone.setDefault(TimeZone.getTimeZone("UTC"));
SpringApplication.run(JambotronApplication.class, args);
@@ -5,14 +5,14 @@ spring.application.name=jambotron
server.port=8082
#============Localhost Configurations========================
spring.datasource.url= jdbc:postgresql://localhost:5433/jambotronDB
spring.datasource.url= jdbc:postgresql://localhost:5433/jambotronDB?options=-c%20timezone=UTC
spring.datasource.username= admin
spring.datasource.password= postgrespw
spring.flyway.baseline-on-migrate=true
spring.flyway.validate-on-migrate=true
spring.flyway.url=jdbc:postgresql://localhost:5433/jambotronDB
spring.flyway.url=jdbc:postgresql://localhost:5433/jambotronDB?options=-c%20timezone=UTC
spring.flyway.user=admin
spring.flyway.password=postgrespw