feat: add local date in docker-compose files

This commit is contained in:
2025-07-12 17:10:20 +02:00
parent b9884d6560
commit fa1ee4dd64
13 changed files with 89 additions and 2 deletions

View File

@@ -8,6 +8,9 @@ services:
- .env - .env
ports: ports:
- '5000:5000' - '5000:5000'
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
depends_on: depends_on:
- redis - redis
@@ -16,4 +19,7 @@ services:
container_name: redis-python container_name: redis-python
ports: ports:
- '6379:6379' - '6379:6379'
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro

View File

@@ -7,6 +7,8 @@ services:
- 5672:5672 - 5672:5672
- 15672:15672 - 15672:15672
volumes: volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
- ./rabbitmq/data/:/var/lib/rabbitmq/ - ./rabbitmq/data/:/var/lib/rabbitmq/
- ./rabbitmq/log/:/var/log/rabbitmq - ./rabbitmq/log/:/var/log/rabbitmq
# environment: # environment:

View File

@@ -5,6 +5,8 @@ services:
ports: ports:
- "2181:2181" - "2181:2181"
volumes: volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
- "zookeeper_data:/bitnami" - "zookeeper_data:/bitnami"
environment: environment:
ALLOW_ANONYMOUS_LOGIN: "yes" ALLOW_ANONYMOUS_LOGIN: "yes"
@@ -23,6 +25,8 @@ services:
ports: ports:
- "9092:9092" - "9092:9092"
volumes: volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
- "kafka_data:/bitnami" - "kafka_data:/bitnami"
environment: environment:
KAFKA_ADVERTISED_LISTENERS: INSIDE://kafka:9092,OUTSIDE://localhost:9093 KAFKA_ADVERTISED_LISTENERS: INSIDE://kafka:9092,OUTSIDE://localhost:9093
@@ -53,6 +57,9 @@ services:
KAFKA_BROKERCONNECT: kafka:9092 KAFKA_BROKERCONNECT: kafka:9092
networks: networks:
- kafka-network - kafka-network
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
depends_on: depends_on:
kafka: kafka:
condition: service_healthy condition: service_healthy
@@ -69,6 +76,9 @@ services:
context: ./producer-raw-recipes context: ./producer-raw-recipes
networks: networks:
- kafka-network - kafka-network
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
depends_on: depends_on:
kafdrop: kafdrop:
condition: service_healthy condition: service_healthy
@@ -90,6 +100,9 @@ services:
context: ./producer-consumer-parse-recipes context: ./producer-consumer-parse-recipes
networks: networks:
- kafka-network - kafka-network
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
depends_on: depends_on:
kafdrop: kafdrop:
condition: service_healthy condition: service_healthy
@@ -112,6 +125,9 @@ services:
context: ./consumer-notification context: ./consumer-notification
networks: networks:
- kafka-network - kafka-network
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
depends_on: depends_on:
kafdrop: kafdrop:
condition: service_healthy condition: service_healthy

View File

@@ -11,6 +11,9 @@ services:
- "9200:9200" - "9200:9200"
networks: networks:
- elastic - elastic
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
kibana: kibana:
image: docker.elastic.co/kibana/kibana:7.15.2 image: docker.elastic.co/kibana/kibana:7.15.2
@@ -21,11 +24,16 @@ services:
- "5601:5601" - "5601:5601"
networks: networks:
- elastic - elastic
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
logstash: logstash:
image: docker.elastic.co/logstash/logstash:7.15.2 image: docker.elastic.co/logstash/logstash:7.15.2
container_name: logstash container_name: logstash
volumes: volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
- ./logstash-config/:/usr/share/logstash/pipeline/ - ./logstash-config/:/usr/share/logstash/pipeline/
environment: environment:
LS_JAVA_OPTS: "-Xmx256m -Xms256m" LS_JAVA_OPTS: "-Xmx256m -Xms256m"
@@ -43,6 +51,9 @@ services:
- elasticsearch - elasticsearch
networks: networks:
- elastic - elastic
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
python-app: python-app:
build: build:
@@ -50,6 +61,8 @@ services:
dockerfile: Dockerfile dockerfile: Dockerfile
container_name: python-app container_name: python-app
volumes: volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
- ./app:/app - ./app:/app
networks: networks:
- elastic - elastic

View File

@@ -6,6 +6,8 @@ services:
ports: ports:
- "9090:9090" - "9090:9090"
volumes: volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
- ${PWD}/prometheus.yml:/etc/prometheus/prometheus.yml - ${PWD}/prometheus.yml:/etc/prometheus/prometheus.yml
restart: unless-stopped restart: unless-stopped
networks: networks:
@@ -26,6 +28,9 @@ services:
restart: unless-stopped restart: unless-stopped
networks: networks:
- monitoring-net - monitoring-net
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
healthcheck: healthcheck:
test: ["CMD", "wget", "--spider", "http://localhost:3000/api/health"] test: ["CMD", "wget", "--spider", "http://localhost:3000/api/health"]
interval: 1m30s interval: 1m30s
@@ -43,6 +48,9 @@ services:
- "8080:8080" - "8080:8080"
networks: networks:
- monitoring-net - monitoring-net
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
command: ["python3", "app/main.py"] command: ["python3", "app/main.py"]
networks: networks:

View File

@@ -10,6 +10,8 @@ services:
- SONARQUBE_JDBC_PASSWORD=sonar - SONARQUBE_JDBC_PASSWORD=sonar
- SONAR_ES_BOOTSTRAP_CHECKS_DISABLE=true - SONAR_ES_BOOTSTRAP_CHECKS_DISABLE=true
volumes: volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
- sonarqube_data:/opt/sonarqube/data - sonarqube_data:/opt/sonarqube/data
- sonarqube_logs:/opt/sonarqube/logs - sonarqube_logs:/opt/sonarqube/logs
- sonarqube_extensions:/opt/sonarqube/extensions - sonarqube_extensions:/opt/sonarqube/extensions
@@ -26,6 +28,8 @@ services:
- discovery.type=single-node - discovery.type=single-node
- ES_JAVA_OPTS=-Xms512m -Xmx512m - ES_JAVA_OPTS=-Xms512m -Xmx512m
volumes: volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
- elasticsearch_data:/usr/share/elasticsearch/data - elasticsearch_data:/usr/share/elasticsearch/data
networks: networks:
- sonarnet - sonarnet
@@ -40,6 +44,8 @@ services:
networks: networks:
- sonarnet - sonarnet
volumes: volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
- sonar_db:/var/lib/postgresql - sonar_db:/var/lib/postgresql
- sonar_db_data:/var/lib/postgresql/data - sonar_db_data:/var/lib/postgresql/data
@@ -49,6 +55,8 @@ services:
depends_on: depends_on:
- sonarqube - sonarqube
volumes: volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
- .:/usr/src - .:/usr/src
working_dir: /usr/src working_dir: /usr/src
networks: networks:

View File

@@ -3,6 +3,9 @@ services:
build: . build: .
container_name: clima-app container_name: clima-app
restart: unless-stopped restart: unless-stopped
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
healthcheck: healthcheck:
test: ["CMD-SHELL", "pgrep -f bot.py || exit 1"] test: ["CMD-SHELL", "pgrep -f bot.py || exit 1"]
interval: 10s interval: 10s

View File

@@ -11,6 +11,9 @@ services:
- PGID=1000 - PGID=1000
- TZ=Europe/Madrid - TZ=Europe/Madrid
restart: unless-stopped restart: unless-stopped
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
depends_on: depends_on:
bbdd: bbdd:
condition: service_healthy condition: service_healthy
@@ -28,6 +31,9 @@ services:
ports: ports:
- "3306:3306" - "3306:3306"
restart: unless-stopped restart: unless-stopped
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
healthcheck: healthcheck:
test: ["CMD-SHELL", "mysqladmin ping -h localhost -u root -p${MYSQL_ROOT_PASSWORD}"] test: ["CMD-SHELL", "mysqladmin ping -h localhost -u root -p${MYSQL_ROOT_PASSWORD}"]
interval: 10s interval: 10s

View File

@@ -11,6 +11,8 @@ services:
- PGID=1000 - PGID=1000
- TZ=Europe/Madrid - TZ=Europe/Madrid
volumes: volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
- ./movie2_bot_data:/app/db - ./movie2_bot_data:/app/db
- ./logs:/app/logs - ./logs:/app/logs
restart: unless-stopped restart: unless-stopped

View File

@@ -8,6 +8,8 @@ services:
ports: ports:
- 127.0.0.1:${MONGODB_PORT:-27017}:${MONGODB_PORT:-27017} - 127.0.0.1:${MONGODB_PORT:-27017}:${MONGODB_PORT:-27017}
volumes: volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
- ${MONGODB_PATH:-./mongodb}:/data/db - ${MONGODB_PATH:-./mongodb}:/data/db
# TODO: add auth # TODO: add auth
@@ -18,6 +20,9 @@ services:
build: build:
context: "." context: "."
dockerfile: Dockerfile dockerfile: Dockerfile
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
depends_on: depends_on:
- mongo - mongo
@@ -34,5 +39,8 @@ services:
- ME_CONFIG_MONGODB_AUTH_DATABASE=chatgpt_telegram_bot - ME_CONFIG_MONGODB_AUTH_DATABASE=chatgpt_telegram_bot
- ME_CONFIG_BASICAUTH_USERNAME=${MONGO_EXPRESS_USERNAME:-username} - ME_CONFIG_BASICAUTH_USERNAME=${MONGO_EXPRESS_USERNAME:-username}
- ME_CONFIG_BASICAUTH_PASSWORD=${MONGO_EXPRESS_PASSWORD:-password} - ME_CONFIG_BASICAUTH_PASSWORD=${MONGO_EXPRESS_PASSWORD:-password}
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
depends_on: depends_on:
- mongo - mongo

View File

@@ -9,6 +9,9 @@ services:
- ./.env - ./.env
networks: networks:
- ollama-net - ollama-net
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
depends_on: depends_on:
- ollama-api - ollama-api
@@ -16,6 +19,8 @@ services:
image: ollama/ollama:latest image: ollama/ollama:latest
container_name: ollama-server container_name: ollama-server
volumes: volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
- ./ollama:/root/.ollama - ./ollama:/root/.ollama
networks: networks:
- ollama-net - ollama-net

View File

@@ -23,6 +23,9 @@ services:
networks: networks:
- tablamareas_network - tablamareas_network
restart: unless-stopped restart: unless-stopped
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
healthcheck: healthcheck:
test: ["CMD-SHELL", "pgrep -f bot.py || exit 1"] test: ["CMD-SHELL", "pgrep -f bot.py || exit 1"]
interval: 10s interval: 10s
@@ -41,9 +44,11 @@ services:
- .db.env - .db.env
networks: networks:
- tablamareas_network - tablamareas_network
volumes:
- pgdata:/var/lib/postgresql/data
restart: unless-stopped restart: unless-stopped
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
- pgdata:/var/lib/postgresql/data
healthcheck: healthcheck:
test: ["CMD-SHELL", "pg_isready -U $POSTGRES_USER -d $POSTGRES_DB || exit 1"] test: ["CMD-SHELL", "pg_isready -U $POSTGRES_USER -d $POSTGRES_DB || exit 1"]
interval: 10s interval: 10s
@@ -62,6 +67,9 @@ services:
- tablamareas_network - tablamareas_network
restart: unless-stopped restart: unless-stopped
command: redis-server --requirepass "$REDIS_PASSWORD" command: redis-server --requirepass "$REDIS_PASSWORD"
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
healthcheck: healthcheck:
test: ["CMD", "redis-cli", "ping"] test: ["CMD", "redis-cli", "ping"]
interval: 10s interval: 10s

View File

@@ -5,5 +5,7 @@ services:
dockerfile: Dockerfile dockerfile: Dockerfile
command: ["-u", "https://vergaracarmona.es", "-o", "output.txt"] command: ["-u", "https://vergaracarmona.es", "-o", "output.txt"]
volumes: volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
- ./output:/app/output - ./output:/app/output
container_name: urlf4ck3r container_name: urlf4ck3r