Skip to content

Commit

Permalink
build: add cloudflare tunnel config to contrib
Browse files Browse the repository at this point in the history
  • Loading branch information
spwoodcock committed May 22, 2024
1 parent 5266231 commit 8efef02
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 25 deletions.
6 changes: 6 additions & 0 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ run-with-josm:
-f docker-compose.yml \
-f contrib/josm/docker-compose.yml \
up -d

run-with-tunnels:
docker compose \
-f docker-compose.yml \
-f contrib/tunnel/fmtm/docker-compose.yml \
-f contrib/tunnel/odk/docker-compose.yml \
up -d

stop:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,35 +15,17 @@
# along with FMTM. If not, see <https:#www.gnu.org/licenses/>.
#

volumes:
fmtm_monitoring_data:
name: fmtm-monitoring-data-${GIT_BRANCH:-local}

networks:
fmtm-net:
name: fmtm-${GIT_BRANCH:-local}

services:
openobserve:
image: public.ecr.aws/zinclabs/openobserve:latest
environment:
ZO_ROOT_USER_EMAIL: ${OPENOBSERVE_USER}
ZO_ROOT_USER_PASSWORD: ${OPENOBSERVE_PASSWORD}
# Keep data 90 days
ZO_COMPACT_DATA_RETENTION_DAYS: ${OPENOBSERVE_RETENTION_DAYS}
# S3 config
# ZO_LOCAL_MODE_STORAGE: s3
# ZO_S3_SERVER_URL: ${S3_xx}
# ZO_S3_REGION_NAME: us-west-1
# ZO_S3_ACCESS_KEY: ${S3_xx}
# ZO_S3_SECRET_KEY: ${S3_xx}
# ZO_S3_BUCKET_NAME: ${S3_xx}
# ZO_S3_PROVIDER: s3
ports:
- "5080:5080"
volumes:
- fmtm_monitoring_data:/data
fmtm-tunnel:
image: "docker.io/cloudflare/cloudflared:latest"
depends_on:
proxy:
condition: service_healthy
networks:
- fmtm-net
restart: unless-stopped
# TODO add healthcheck
restart: "unless-stopped"
command: tunnel --url http://proxy:80
31 changes: 31 additions & 0 deletions contrib/tunnel/odk/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright (c) 2022, 2023 Humanitarian OpenStreetMap Team
# This file is part of FMTM.
#
# FMTM is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# FMTM is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with FMTM. If not, see <https:#www.gnu.org/licenses/>.
#

networks:
fmtm-net:
name: fmtm-${GIT_BRANCH:-local}

services:
central-tunnel:
image: "docker.io/cloudflare/cloudflared:latest"
depends_on:
central:
condition: service_healthy
networks:
- fmtm-net
restart: "unless-stopped"
command: tunnel --url http://central:8383

0 comments on commit 8efef02

Please sign in to comment.