Add support services

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2023-08-27 17:04:53 +02:00
parent 50c09cf936
commit 068f2d8601
7 changed files with 119 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
server {
listen 80;
}

View File

@@ -0,0 +1,14 @@
services:
nginx:
image: nginx
hostname: nginx
restart: unless-stopped
ports:
- 8080:80
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
- ./config:/etc/nginx/conf.d
- nginx-logs:/var/log/nginx
volumes:
nginx-logs:

32
support/nginx/nginx.conf Normal file
View File

@@ -0,0 +1,32 @@
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log notice;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
#gzip on;
include /etc/nginx/conf.d/*.conf;
}

View File

@@ -0,0 +1,8 @@
FROM rabbitmq
RUN apt-get update && apt-get install -y curl jq wget && rm -rf /var/lib/apt/lists/*
RUN curl -s "https://api.github.com/repos/noxdafox/rabbitmq-message-deduplication/releases/latest" | jq -r '.assets[] | select(.name | endswith(".ez")).browser_download_url' | while read url; do file=$(basename $url); new_name=$(echo $file | sed 's/-[^-]*\.ez/\.ez/'); wget $url -O plugins/$new_name; done
RUN rabbitmq-plugins disable --offline rabbitmq_prometheus
RUN rabbitmq-plugins enable --offline rabbitmq_management rabbitmq_message_deduplication

View File

@@ -0,0 +1,21 @@
services:
rabbitmq:
build:
context: .
dockerfile: Dockerfile
hostname: rabbitmq
restart: unless-stopped
ports:
- 5672:5672
- 15672:15672
volumes:
- rabbitmq-data:/var/lib/rabbitmq
- rabbitmq-logs:/var/log/rabbitmq
environment:
- RABBITMQ_DEFAULT_VHOST=${RABBITMQ_VHOST}
- RABBITMQ_DEFAULT_USER=${RABBITMQ_USER}
- RABBITMQ_DEFAULT_PASS=${RABBITMQ_PASSWORD}
volumes:
rabbitmq-data:
rabbitmq-logs:

View File

@@ -0,0 +1,19 @@
services:
timescaledb:
image: timescale/timescaledb-ha:pg15-all
hostname: timescaledb
restart: unless-stopped
ports:
- 5432:5432
volumes:
- timescaledb-data:/home/postgres/pgdata/data
- timescaledb-logs:/home/postgres/pg_log
environment:
- TIMESCALEDB_TELEMETRY=off
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
volumes:
timescaledb-data:
timescaledb-logs: