Skip to content

Commit

Permalink
refactor: standartize app naming
Browse files Browse the repository at this point in the history
  • Loading branch information
dd84ai committed Jan 13, 2025
1 parent 550410a commit d0cc408
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docker-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Check out source repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Get version from tag
run: |
set -x
Expand Down Expand Up @@ -49,6 +49,6 @@ jobs:
set -ex
docker pull darkwind8/darkbot:production
sleep 5
docker service update --image darkwind8/darkbot:production darkbot-production
docker service update --image darkwind8/darkbot:production production-darkbot-app
env:
DOCKER_HOST: ssh://root@darkbot
4 changes: 2 additions & 2 deletions .github/workflows/docker-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Check out source repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Get version from tag
run: |
set -x
Expand Down Expand Up @@ -45,6 +45,6 @@ jobs:
set -ex
docker pull darkwind8/darkbot:staging
sleep 5
docker service update --image darkwind8/darkbot:staging darkbot-staging
docker service update --image darkwind8/darkbot:staging staging-darkbot-app
env:
DOCKER_HOST: ssh://root@darkbot
8 changes: 5 additions & 3 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Check out source repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.10'
Expand All @@ -27,9 +27,11 @@ jobs:
run: pip install -r requirements.txt -c constraints.txt
- name: Build docs
run: mkdocs build
- uses: actions/upload-pages-artifact@v1
- name: Upload artifacts for deployment to Github Pages
uses: actions/upload-pages-artifact@v3
with:
name: github-pages
path: './site'
- uses: actions/deploy-pages@v1
- name: Deploy to pages
uses: actions/deploy-pages@v4
id: deployment
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Check out source repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install Go
uses: darklab8/infra/.github/actions/install-go@master
- name: Install Taskfile
Expand Down
8 changes: 6 additions & 2 deletions tf/modules/darkbot/docker.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@ resource "docker_image" "darkbot" {
keep_locally = true
}

locals {
service_name = "${var.environment}-darkbot-app"
}

resource "docker_container" "darkbot" {
count = var.mode == "docker" ? 1 : 0

name = "darkbot-${var.environment}"
name = local.service_name
image = docker_image.darkbot[0].name

env = [for k, v in local.envs : "${k}=${v}"]
Expand All @@ -32,7 +36,7 @@ resource "docker_container" "darkbot" {
resource "docker_service" "darkbot" {
count = var.mode == "swarm" ? 1 : 0

name = "darkbot-${var.environment}"
name = local.service_name

task_spec {
container_spec {
Expand Down

0 comments on commit d0cc408

Please sign in to comment.