Copy services:
mariadb:
image: mariadb:lts
container_name: flyingfish_db
environment:
MARIADB_AUTO_UPGRADE: '1'
MARIADB_INITDB_SKIP_TZINFO: '1'
MYSQL_ROOT_PASSWORD: "${MARIADB_ROOT_PASSWORD}"
MYSQL_ROOT_HOST: '%'
MYSQL_DATABASE: "${MARIADB_DATABASE}"
healthcheck:
test: [ "CMD", "mariadb", "-u${MARIADB_ROOT_USERNAME}", "-p${MARIADB_ROOT_PASSWORD}", "-e", "use ${MARIADB_DATABASE}" ]
interval: 10s
timeout: 5s
retries: 5
start_period: 5s
volumes:
- flyingfishDbData:/var/lib/mysql
ports:
- "127.0.0.1:3306:3306"
networks:
flyingfishNet:
ipv4_address: 10.103.0.2
logging:
driver: "json-file"
options:
max-size: "500k"
max-file: "50"
influxdb:
image: influxdb:latest
container_name: flyingfish_influxdb
volumes:
- flyingfishInfluxdbData:/var/lib/influxdb2
environment:
- DOCKER_INFLUXDB_INIT_MODE=setup
- DOCKER_INFLUXDB_INIT_USERNAME=${INFLUXDB_USERNAME}
- DOCKER_INFLUXDB_INIT_PASSWORD=${INFLUXDB_PASSWORD}
- DOCKER_INFLUXDB_INIT_ORG=${INFLUXDB_ORG}
- DOCKER_INFLUXDB_INIT_BUCKET=${INFLUXDB_BUCKET}
- DOCKER_INFLUXDB_INIT_RETENTION=${INFLUXDB_RETENTION}
- DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=${INFLUXDB_ADMIN_TOKEN}
- INFLUXDB_STORAGE_CACHE_MAX_MEMORY_SIZE=52428800
- INFLUXDB_STORAGE_CACHE_SNAPSHOT_MEMORY_SIZE=26214400
- INFLUXDB_STORAGE_CACHE_SNAPSHOT_WRITE_COLD_DURATION=10s
- INFLUXDB_STORAGE_WAL_FSYNC_DELAY=1s
- INFLUXDB_STORAGE_INDEX_VERSION=tsi1
ports:
- "127.0.0.1:8086:8086"
networks:
flyingfishNet:
ipv4_address: 10.103.0.5
healthcheck:
test: "curl -f http://localhost:8086/ping"
interval: 5s
timeout: 10s
retries: 5
logging:
driver: "json-file"
options:
max-size: "500k"
max-file: "50"
redis:
image: redis:7.2-alpine
container_name: flyingfish_redis
volumes:
- flyingfishRedisData:/data
ports:
- '127.0.0.1:6379:6379'
command: [
"redis-server",
"--save",
"${REDIS_SAVE}",
"--loglevel",
"${REDIS_LOGLEVEL}",
"--maxmemory",
"${REDIS_MAX_MEMORY}",
"--maxmemory-policy",
"allkeys-lru",
"--requirepass",
"${REDIS_REQUIREPASS}"
]
networks:
flyingfishNet:
ipv4_address: 10.103.0.7
healthcheck:
test: [ "CMD-SHELL", "redis-cli -a ${REDIS_REQUIREPASS} ping | grep PONG" ]
interval: 1s
timeout: 3s
retries: 5
logging:
driver: "json-file"
options:
max-size: "500k"
max-file: "50"
flyingfish:
image: stefanwerfling/flyingfish:latest
container_name: flyingfish_service
volumes:
- flyingfishLetsencrypt:/etc/letsencrypt:rw
- flyingfish:/var/lib/flyingfish:rw
environment:
FLYINGFISH_DB_MYSQL_USERNAME: "${MARIADB_ROOT_USERNAME}"
FLYINGFISH_DB_MYSQL_PASSWORD: "${MARIADB_ROOT_PASSWORD}"
FLYINGFISH_DB_MYSQL_DATABASE: "${MARIADB_DATABASE}"
FLYINGFISH_DB_INFLUX_URL: "${INFLUXDB_URL}"
FLYINGFISH_DB_INFLUX_TOKEN: "${INFLUXDB_ADMIN_TOKEN}"
FLYINGFISH_DB_INFLUX_ORG: "${INFLUXDB_ORG}"
FLYINGFISH_DB_INFLUX_BUCKET: "${INFLUXDB_BUCKET}"
FLYINGFISH_HTTPSERVER_PORT: "${HTTPSERVER_PORT}"
FLYINGFISH_LOGGING_LEVEL: "${LOGGING_LEVEL}"
FLYINGFISH_HIMHIP_USE: "${HIMHIP_USE}"
FLYINGFISH_HIMHIP_SECRET: "${HIMHIP_SECRET}"
FLYINGFISH_DYNDNSSERVER_ENABLE: "${DYNDNSSERVER_ENABLE}"
FLYINGFISH_DB_REDIS_URL: "${REDIS_URL}"
FLYINGFISH_DB_REDIS_PASSWORD: "${REDIS_REQUIREPASS}"
ports:
- "443:443"
- "80:80"
- "5333:53/udp"
- "5333:53/tcp"
- "${HTTPSERVER_PORT}:${HTTPSERVER_PORT}"
- "1900:1900"
networks:
flyingfishNet:
ipv4_address: 10.103.0.3
logging:
driver: "json-file"
options:
max-size: "500k"
max-file: "50"
depends_on:
mariadb:
condition: service_healthy
redis:
condition: service_healthy
influxdb:
condition: service_healthy
himhip:
image: stefanwerfling/flyingfish_himip:latest
container_name: flyingfish_himhip
environment:
FLYINGFISH_SECRET: "${HIMHIP_SECRET}"
FLYINGFISH_SERVER_PORT: "${HTTPSERVER_PORT}"
FLYINGFISH_LOGGING_LEVEL: "${LOGGING_LEVEL}"
FLYINGFISH_DB_REDIS_URL: "${REDIS_URL}"
FLYINGFISH_DB_REDIS_PASSWORD: "${REDIS_REQUIREPASS}"
network_mode: host
cap_add:
- ALL
logging:
driver: "json-file"
options:
max-size: "500k"
max-file: "50"
depends_on:
redis:
condition: service_healthy
flyingfish:
condition: service_started
sshremote:
image: stefanwerfling/flyingfish_ssh:latest
container_name: flyingfish_ssh
volumes:
- flyingfishSsh:/opt/app/ssh:rw
environment:
FLYINGFISH_DB_MYSQL_USERNAME: "${MARIADB_ROOT_USERNAME}"
FLYINGFISH_DB_MYSQL_PASSWORD: "${MARIADB_ROOT_PASSWORD}"
FLYINGFISH_DB_MYSQL_DATABASE: "${MARIADB_DATABASE}"
FLYINGFISH_HTTPSERVER_PORT: "${HTTPSERVER_PORT}"
FLYINGFISH_LOGGING_LEVEL: "${LOGGING_LEVEL}"
ports:
- "2222:22"
networks:
flyingfishNet:
ipv4_address: 10.103.0.4
logging:
driver: "json-file"
options:
max-size: "500k"
max-file: "50"
depends_on:
mariadb:
condition: service_healthy
redis:
condition: service_healthy
flyingfish:
condition: service_started
ddnsserver:
image: stefanwerfling/flyingfish_ddns:latest
container_name: flyingfish_ddns
environment:
FLYINGFISH_DB_MYSQL_USERNAME: "${MARIADB_ROOT_USERNAME}"
FLYINGFISH_DB_MYSQL_PASSWORD: "${MARIADB_ROOT_PASSWORD}"
FLYINGFISH_DB_MYSQL_DATABASE: "${MARIADB_DATABASE}"
FLYINGFISH_LOGGING_LEVEL: "${LOGGING_LEVEL}"
networks:
flyingfishNet:
ipv4_address: 10.103.0.6
logging:
driver: "json-file"
options:
max-size: "500k"
max-file: "50"
depends_on:
mariadb:
condition: service_healthy
redis:
condition: service_healthy
flyingfish:
condition: service_started
volumes:
flyingfishDbData:
driver: local
flyingfishInfluxdbData:
driver: local
flyingfish:
driver: local
flyingfishLetsencrypt:
driver: local
flyingfishSsh:
driver: local
networks:
flyingfishNet:
driver: bridge
ipam:
config:
- subnet: 10.103.0.0/16