Skip to content

Commit 1dd8255

Browse files
committed
feat!: bump major version
Preparing for stable release ci: add healthchecks for traefik, dnsmasq and portrainer ci: fixes in Makefile
1 parent 9781473 commit 1dd8255

File tree

4 files changed

+40
-22
lines changed

4 files changed

+40
-22
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,14 @@ jobs:
2424
strategy:
2525
fail-fast: false
2626
matrix:
27-
os: [ubuntu-latest]
27+
os:
28+
- ubuntu-latest
2829
steps:
2930
- name: 📦 Install goss
3031
uses: e1himself/goss-installation-action@v1.2.1
3132

3233
- name: 📦 Check out the codebase
3334
uses: actions/checkout@v4.1.6
34-
with:
35-
fetch-depth: 0
3635

3736
### For Cross Platform OSX builds uncomment these lines
3837
- name: 🖥️ Set up QEMU
@@ -45,7 +44,10 @@ jobs:
4544
with:
4645
install: true
4746

48-
- name: 🧪 Run dcgoss tests
49-
run: make test
47+
- name: 🌎 Generate .env file
48+
run: make env
49+
50+
- name: 🐳 Start Docker Compose services
51+
run: make up
5052

5153
...

Makefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ BUILDER_PARAMS ?= $(DOCKER) run --rm -i \
2424
--env SHARED_DOMAIN_SEGMENT="$(SHARED_DOMAIN_SEGMENT)"
2525

2626
BUILDER ?= $(BUILDER_PARAMS) $(SUPPORT_IMAGE)
27-
BUILDER_WIRED ?= $(BUILDER_PARAMS) --network project.$(COMPOSE_PROJECT_NAME) $(SUPPORT_IMAGE)
27+
BUILDER_WIRED ?= $(BUILDER_PARAMS) --network network.$(COMPOSE_PROJECT_NAME) $(SUPPORT_IMAGE)
2828

2929
# Shorthand envsubst command, executed through build-deps
3030
ENVSUBST ?= $(BUILDER) envsubst
@@ -133,7 +133,7 @@ cert-install: ## Run mkcert to install CA into system storage and generate defau
133133
# Docker Actions
134134
# ------------------------------------------------------------------------------------
135135
up: ## Fire up project
136-
$(DOCKER_COMPOSE) up --remove-orphans -d
136+
$(DOCKER_COMPOSE) up --remove-orphans -d --wait
137137
.PHONY: up
138138

139139
down: ## Stops and destroys running containers
@@ -160,10 +160,13 @@ pull: ## Pull upstream images, specified in docker-compose.yml file
160160
.PHONY: pull
161161

162162
clean:
163-
# $(DOCKER_COMPOSE) down -v
164163
$(DOCKER_COMPOSE) rm --force --stop
165164
.PHONY: clean
166165

166+
prune: ## Stops and removes all containers and volumes
167+
$(DOCKER_COMPOSE) down --remove-orphans --volumes
168+
.PHONY: prune
169+
167170
#
168171
# Code Quality, Git, Linting
169172
# ------------------------------------------------------------------------------------

docker-compose.yaml

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
---
22

3-
version: '3.9'
4-
53
services:
64
router:
75
image: traefik:v3.0.1
86
container_name: router
97
restart: on-failure
108
ports:
11-
- "80:80"
12-
- "443:443"
9+
- '80:80'
10+
- '443:443'
1311
volumes:
1412
- /var/run/docker.sock:/var/run/docker.sock:ro
1513
- ./traefik/conf/traefik.yml:/etc/traefik/traefik.yml
@@ -21,29 +19,35 @@ services:
2119
- traefik.http.routers.router.entrypoints=websecure
2220
- traefik.http.services.router.loadbalancer.server.port=8080
2321
- traefik.http.routers.router.tls=true
22+
healthcheck:
23+
test: ['CMD-SHELL', 'traefik healthcheck --ping']
24+
interval: 4s
25+
timeout: 4s
26+
retries: 8
27+
start_period: 4s
2428

2529
ui:
2630
image: portainer/portainer-ce:2.20.3-alpine
2731
container_name: ui
2832
restart: on-failure
2933
ports:
30-
- "9000"
34+
- '9000'
3135
volumes:
3236
- /var/run/docker.sock:/var/run/docker.sock
3337
- ui_data:/data
34-
command: "-H unix:///var/run/docker.sock"
38+
command: '-H unix:///var/run/docker.sock'
3539
labels:
3640
- traefik.enable=true
3741
- traefik.http.routers.ui.rule=Host(`ui${SHARED_DOMAIN_SEGMENT}.docker`)
3842
- traefik.http.routers.ui.entrypoints=websecure
3943
- traefik.http.services.ui.loadbalancer.server.port=9000
4044
- traefik.http.routers.ui.tls=true
4145
healthcheck:
42-
test: "wget --no-verbose --tries=1 --spider --no-check-certificate http://localhost:9000 || exit 1"
43-
interval: 60s
44-
timeout: 5s
45-
retries: 3
46-
start_period: 20s
46+
test: 'wget -q --no-verbose --tries=3 --spider --no-check-certificate http://127.0.0.1:9000/api/system/status || exit 1'
47+
interval: 4s
48+
timeout: 4s
49+
retries: 8
50+
start_period: 4s
4751

4852
dns:
4953
image: drpsychick/dnsmasq:latest
@@ -52,17 +56,23 @@ services:
5256
env_file:
5357
- .env
5458
ports:
55-
- "53:53/tcp"
56-
- "53:53/udp"
59+
- '53:53/tcp'
60+
- '53:53/udp'
5761
cap_add:
5862
- NET_ADMIN
63+
healthcheck:
64+
test: ['CMD-SHELL', 'nslookup localhost 127.0.0.1 || exit 1']
65+
interval: 4s
66+
timeout: 4s
67+
retries: 8
68+
start_period: 4s
5969

6070
networks:
6171
default:
6272
name: network.${COMPOSE_PROJECT_NAME}
6373
ipam:
6474
config:
65-
- subnet: 172.100.61.1/24
75+
- subnet: 172.100.61.0/24
6676

6777
volumes:
6878
ui_data:

traefik/conf/traefik.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,7 @@ tls:
3939
certFile: /etc/traefik/cert.pem
4040
keyFile: /etc/traefik/key.pem
4141

42+
ping:
43+
entryPoint: 'web'
44+
4245
...

0 commit comments

Comments
 (0)