Skip to content

Commit

Permalink
�fix(infra): delete start-up profile and add caddy profile (#54)
Browse files Browse the repository at this point in the history
* fix(infra): start and restart all containers except for start-up containers

* fix(infra): check only caddy container is running

* fix(infra): delete start-up profile and add caddy profile
  • Loading branch information
ssupecial authored May 29, 2024
1 parent 15efaf8 commit ef340c6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/update-stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,25 +27,25 @@ jobs:
EOF
- name: Check if initial containers are running
id: check-start-up-container
- name: Check if caddy container is running
id: check-caddy-container
run: |
{
echo 'stdout<<EOF'
docker compose --profile start-up ps -q
docker compose --profile caddy ps -q
echo EOF
} >> "$GITHUB_OUTPUT"
- name: when initial containers are not running, start start-up containers
if: steps.check-start-up-container.outputs.stdout == ''
- name: when caddy container is not running, start caddy container
if: steps.check-caddy-container.outputs.stdout == ''
run: >
docker compose --profile start-up up -d
docker compose --profile caddy up -d
- name: Start all containers except for start-up
- name: Start all containers except for caddy
run: |
docker compose --profile log --profile trace --profile metric up -d
- name: Restart all containers except for start-up
- name: Restart all containers except for caddy
run: |
docker compose --profile log --profile trace --profile metric restart
Expand Down
8 changes: 4 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3.8"

services:
caddy:
profiles: ["start-up"]
profiles: ["caddy"]
image: caddy:2.7.6-alpine
container_name: caddy
restart: always
Expand All @@ -12,7 +12,7 @@ services:
network_mode: host

minio:
profiles: ["start-up"]
profiles: ["log", "trace"]
container_name: minio
image: minio/minio:latest
volumes:
Expand All @@ -27,7 +27,7 @@ services:
shm_size: "1gb"

createbuckets:
profiles: ["start-up", "log", "trace"]
profiles: ["log", "trace"]
image: minio/mc
volumes:
- minio_data_volume:/data
Expand Down Expand Up @@ -152,7 +152,7 @@ services:
restart: always

grafana:
profiles: ["start-up"]
profiles: ["log", "trace", "metric"]
image: grafana/grafana:latest
env_file:
- .env
Expand Down

0 comments on commit ef340c6

Please sign in to comment.