Skip to content

Commit

Permalink
Updater docker-compose.yaml (#442)
Browse files Browse the repository at this point in the history
* Updating example config path as they changed if the Docker image is
  built with `ko`
* Removing healthcheck example commands as they won't work for `ko`
  images anymore
  • Loading branch information
bitshape authored Mar 27, 2022
1 parent 3215ab3 commit 9319c18
Showing 1 changed file with 8 additions and 28 deletions.
36 changes: 8 additions & 28 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,10 @@ services:
labels:
autoheal: "true"
volumes:
- ./config:/usr/src/app/config:z
- ./config:/ko-app/config:z
environment:
UPDATER_DESTINATION_CONFIG: "config/config.json"
UPDATER_DESTINATION_CONFIG: "/ko-app/config/config.json"
UPDATER_MODE: true
healthcheck:
test: ["CMD", "test", "-f", "config/config.json"]
timeout: 5s
interval: 5s
retries: 5

# this Docker container will use VPN 01
# it will use config.json created by 'updater' container above
Expand All @@ -122,22 +117,17 @@ services:
ovpn_01:
condition: service_healthy
updater:
condition: service_healthy
condition: service_started
network_mode: "service:ovpn_01"
labels:
autoheal: "true"
# set single country to check IP against and exit container if IP matches country OR IP cannot be determined
environment:
STRICT_COUNTRY_CHECK: "true"
COUNTRY_LIST: "Country"
CONFIG: "config/config.json"
CONFIG: "/ko-app/config/config.json"
volumes:
- ./config:/usr/src/app/config:z
healthcheck:
test: ["CMD", "nslookup", "google.com", "8.8.8.8"]
timeout: 10s
interval: 30s
retries: 3
- ./config:/ko-app/config:z

# this Docker container will use VPN 02
# it will use config.json created by 'updater' container above
Expand All @@ -149,22 +139,17 @@ services:
ovpn_02:
condition: service_healthy
updater:
condition: service_healthy
condition: service_started
network_mode: "service:ovpn_02"
labels:
autoheal: "true"
# set multiple countries to check IP against and exit container if IP matches country OR IP cannot be determined
environment:
STRICT_COUNTRY_CHECK: "true"
COUNTRY_LIST: "Country, Another Country"
CONFIG: "config/config.json"
CONFIG: "/ko-app/config/config.json"
volumes:
- ./config:/usr/src/app/config:z
healthcheck:
test: ["CMD", "nslookup", "google.com", "8.8.8.8"]
timeout: 10s
interval: 30s
retries: 3
- ./config:/ko-app/config:z

# this Docker container will use VPN 03
# it will download config itself and won't access shared volume so those options are undefined here
Expand All @@ -181,11 +166,6 @@ services:
environment:
STRICT_COUNTRY_CHECK: "false"
COUNTRY_LIST: "Country"
healthcheck:
test: ["CMD", "nslookup", "google.com", "8.8.8.8"]
timeout: 10s
interval: 30s
retries: 3

secrets:
provider01_secret:
Expand Down

0 comments on commit 9319c18

Please sign in to comment.