-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
66 lines (63 loc) · 1.89 KB
/
docker-compose.yml
File metadata and controls
66 lines (63 loc) · 1.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#version: '3.8'
services:
eterrain-tf-backend:
# build: .
container_name: terraform-backend
image: terraform-backend:latest
depends_on:
db:
condition: service_healthy
environment:
# - VIRTUAL_HOST=${VIRTUAL_HOST:-tf.eterrain.ee}
# - LETSENCRYPT_HOST=${LETSENCRYPT_HOST:-tf.eterrain.ee}
# - LETSENCRYPT_EMAIL=${LETSENCRYPT_EMAIL:-ankek777@gmail.com}
- HOST=0.0.0.0
- PORT=7777
- STORAGE_TYPE=dual
- STORAGE_PATH=/app/data
- DB_HOST=db
- DB_PORT=3306
- DB_USER=exampleuser
- DB_PASSWORD=yrA7MpQwKVxAfWP6XhZ54mtG7qZZfVzHe7mULWmFsgzY6krSUZ
- DB_NAME=data
- ENABLE_TLS=${ENABLE_TLS:-false}
- TLS_CERT_FILE=${TLS_CERT_FILE:-}
- TLS_KEY_FILE=${TLS_KEY_FILE:-}
volumes:
# Persist data directory for CSV storage
- ./data:/app/data
# Mount auth configuration (read-only)
- ./auth.cfg:/app/auth.cfg:ro
# Optional: Mount TLS certificates if needed
# - ./certs:/app/certs:ro
restart: unless-stopped
# Expose port only if not using nginx-proxy
# Uncomment the line below if you're not using nginx-proxy
ports:
- "7777:7777"
db:
image: mysql:8.4
container_name: terraform-backend-db
restart: always
environment:
MYSQL_DATABASE: ${DB_NAME:-data}
MYSQL_USER: ${DB_USER:-exampleuser}
MYSQL_PASSWORD: ${DB_PASSWORD:-yrA7MpQwKVxAfWP6XhZ54mtG7qZZfVzHe7mULWmFsgzY6krSUZ}
MYSQL_RANDOM_ROOT_PASSWORD: '1'
volumes:
- db_data:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-p$$MYSQL_ROOT_PASSWORD"]
interval: 5s
timeout: 5s
retries: 20
start_period: 10s
# Uncomment the line below to expose MySQL port for debugging
ports:
- "3306:3306"
volumes:
db_data:
# networks:
# default:
# external:
# name: nginx-proxy