Skip to content

Commit

Permalink
build: add electric sync service to bunkerweb setup
Browse files Browse the repository at this point in the history
  • Loading branch information
spwoodcock committed Mar 3, 2025
1 parent 2e10e68 commit 242db0a
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 178 deletions.
6 changes: 5 additions & 1 deletion compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,15 @@ services:
# EMAIL_LETS_ENCRYPT:
# USE_LETS_ENCRYPT_STAGING: yes
# Reverse proxy configs
SERVER_NAME: fmtm.localhost api.fmtm.localhost s3.fmtm.localhost odk.fmtm.localhost odkcentral
SERVER_NAME: fmtm.localhost api.fmtm.localhost s3.fmtm.localhost sync.fmtm.localhost odk.fmtm.localhost odkcentral
fmtm.localhost_REVERSE_PROXY_HOST: http://ui:7051
fmtm.localhost_MAX_CLIENT_SIZE: 1G
api.fmtm.localhost_REVERSE_PROXY_HOST: http://api:8000
api.fmtm.localhost_MAX_CLIENT_SIZE: 1G
s3.fmtm.localhost_REVERSE_PROXY_HOST: http://s3:9000
s3.fmtm.localhost_MAX_CLIENT_SIZE: 10G
sync.fmtm.localhost_REVERSE_PROXY_HOST: http://electric:3000
sync.fmtm.localhost_MAX_CLIENT_SIZE: 1G
odk.fmtm.localhost_REVERSE_PROXY_HOST: http://central:8383
odk.fmtm.localhost_REVERSE_PROXY_URL: ~ ^/v\d
# buffer requests, but not responses, so streaming out works
Expand All @@ -112,6 +114,7 @@ services:
ipv4_address: 10.20.30.50
restart: "unless-stopped"

# This is needed by bunkerweb, but we don't use it
proxy-config:
image: "ghcr.io/bunkerity/bunkerweb-scheduler:1.5.9"
depends_on:
Expand All @@ -124,6 +127,7 @@ services:
restart: "no"
entrypoint: timeout 120 ./entrypoint.sh

# This is needed by the bunkerweb scheduler to run unfortunately
proxy-docker-sock:
image: "docker.io/tecnativa/docker-socket-proxy:0.2.0"
volumes:
Expand Down
11 changes: 2 additions & 9 deletions deploy/compose.development.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -129,20 +129,13 @@ services:
# api.fmtm.localhost_MAX_CLIENT_SIZE: 1G
# s3.fmtm.localhost_REVERSE_PROXY_HOST: http://s3:9000
# s3.fmtm.localhost_MAX_CLIENT_SIZE: 10G
# sync.fmtm.localhost_REVERSE_PROXY_HOST: http://electric:3000
# sync.fmtm.localhost_MAX_CLIENT_SIZE: 1G
# odk.fmtm.localhost_REVERSE_PROXY_HOST: http://central:8383
# odk.fmtm.localhost_REVERSE_PROXY_URL: ~ ^/v\d
# # buffer requests, but not responses, so streaming out works
# odk.fmtm.localhost_REVERSE_PROXY_BUFFERING: no
# odk.fmtm.localhost_MAX_CLIENT_SIZE: 500m
# # Service for local development only to facilitate https odkcentral
# odkcentral_REVERSE_PROXY_HOST: http://central:8383
# odkcentral_REVERSE_PROXY_URL: ~ ^/v\d
# odkcentral_REVERSE_PROXY_BUFFERING: no
# # Custom cert only for local development
# odkcentral_USE_CUSTOM_SSL: yes
# odkcentral_AUTO_REDIRECT_HTTP_TO_HTTPS: no
# odkcentral_CUSTOM_SSL_CERT_DATA: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUI5RENDQVhtZ0F3SUJBZ0lVWXFyb0dWRVdsK204eU9OY2pUU2pCWThkckN3d0NnWUlLb1pJemowRUF3SXcKRlRFVE1CRUdBMVVFQXd3S2IyUnJZMlZ1ZEhKaGJEQWdGdzB5TkRBM01qTXhNakF6TVRWYUdBOHlNVEkwTURZeQpPVEV5TURNeE5Wb3dGVEVUTUJFR0ExVUVBd3dLYjJSclkyVnVkSEpoYkRCMk1CQUdCeXFHU000OUFnRUdCU3VCCkJBQWlBMklBQktSZmpOQVFzWUI0ekNXckdETHdKNEVIRDRTNW5rL1Z3aG00TmYwN203c0RTai9RTzlYK0JnNjIKeWlMbWVzT1ZMRExHRklpZXZ2aHIrZkxNY0YwUDQwN0FWKytER1o5bXZ6VmNwMVdZMlE5NllpTVVuelM3MWx0RQo4K3BXbFBmanRLT0JoekNCaERBZEJnTlZIUTRFRmdRVWNVekZsNUpWN1dUM045VUhxbmhSRHlWT3ZjY3dId1lEClZSMGpCQmd3Rm9BVWNVekZsNUpWN1dUM045VUhxbmhSRHlWT3ZjY3dEd1lEVlIwVEFRSC9CQVV3QXdFQi96QXgKQmdOVkhSRUVLakFvZ2dwdlpHdGpaVzUwY21Gc2doUXFMbTlrYXk1bWJYUnRMbXh2WTJGc2FHOXpkSWNFQ2hRZQpNakFLQmdncWhrak9QUVFEQWdOcEFEQm1BakVBb2xuOGRubmlQN0dKSEJPQW4rTHVCV0ZhaUY1NHFZRmpTYyt1Clpia1cwY1pyNWw2VnZ6WVlBdGdWbUtOdTB5WWRBakVBMWlvT2JRTERYdDV3S1JPWjV5VUtmbys2T21IbTV1NWkKQU5LUHd2MExqc2ZIYk5hbzJMWnduK0VxTjNtdUpPNXEKLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo=
# odkcentral_CUSTOM_SSL_KEY_DATA: LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCk1JRzJBZ0VBTUJBR0J5cUdTTTQ5QWdFR0JTdUJCQUFpQklHZU1JR2JBZ0VCQkRCc21pQjBmUU5hR1VobEdpWnMKNks1YVo1K1hUOVM1cFdlWkhZc05SVXRlK2FRZ1hIK0pTSmpwRnFqRnNLN21abldoWkFOaUFBU2tYNHpRRUxHQQplTXdscXhneThDZUJCdytFdVo1UDFjSVp1RFg5TzV1N0Ewby8wRHZWL2dZT3Rzb2k1bnJEbFN3eXhoU0lucjc0CmEvbnl6SEJkRCtOT3dGZnZneG1mWnI4MVhLZFZtTmtQZW1JakZKODB1OVpiUlBQcVZwVDM0N1E9Ci0tLS0tRU5EIFBSSVZBVEUgS0VZLS0tLS0K
# ports:
# - ${FMTM_DEV_PORT:-7050}:8080
# networks:
Expand Down
26 changes: 0 additions & 26 deletions nginx/templates/cert-init/sync.conf.template

This file was deleted.

62 changes: 0 additions & 62 deletions nginx/templates/dev/sync.conf.template

This file was deleted.

79 changes: 0 additions & 79 deletions nginx/templates/sync.conf.template

This file was deleted.

2 changes: 1 addition & 1 deletion src/backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ USER appuser
# Add certificates to use ODK Central over SSL (HTTPS, required)
FROM runtime AS add-odk-certs
USER root
# Add the SSL cert for debug odkcentral
# Add the SSL cert for local odkcentral install (debugging only)
RUN echo 'LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUI5RENDQVhtZ0F3SUJBZ0lVWXFyb\
0dWRVdsK204eU9OY2pUU2pCWThkckN3d0NnWUlLb1pJemowRUF3SXcKRlRFVE1CRUdBMVVFQXd3S2Iy\
UnJZMlZ1ZEhKaGJEQWdGdzB5TkRBM01qTXhNakF6TVRWYUdBOHlNVEkwTURZeQpPVEV5TURNeE5Wb3d\
Expand Down

0 comments on commit 242db0a

Please sign in to comment.