Skip to content

Commit

Permalink
feat: add play docker workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
dougppaz committed Mar 28, 2024
1 parent 398dac0 commit 10939c4
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 3 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Play Docker

on: workflow_dispatch

jobs:
docker:
runs-on: ubuntu-latest
environment: prod
steps:
- uses: actions/checkout@v4
- name: Run Docker
uses: dawidd6/action-ansible-playbook@v2
with:
playbook: playbook/docker.yml
key: ${{secrets.SSH_PRIVATE_KEY}}
options: |
-e @variables.yml
-i inventories/inventory.yml
known_hosts: |
vps-16507529.servers.r.oll.world ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMJ9uWhbqfUmpQC97ltAAbdWl9GpAoK4OllCTWenHnEX
vps-9d706477.servers.r.oll.world ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGVbM5pfoG8fudLH2C02l3Zn+XO/ub4qwymZhQXD0ktO
vps-acf71116.servers.r.oll.world ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID8tAXxIN5OvimPRcz7xWhhQWwy8ThtaWqP4Arp5dfq2
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.local/
.prod/
.env
13 changes: 12 additions & 1 deletion inventories/inventory.yml
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
servers: {}
servers:
hosts:
vps-16507529.servers.r.oll.world:
ansible_ssh_user: ubuntu
advertise_addr: 51.79.84.91
docker_swarm_manager_host: true
vps-9d706477.servers.r.oll.world:
ansible_ssh_user: ubuntu
advertise_addr: 144.217.240.162
vps-acf71116.servers.r.oll.world:
ansible_ssh_user: ubuntu
advertise_addr: 144.217.243.18
4 changes: 2 additions & 2 deletions variables.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ local_certs_dir: '{{ lookup("env", "LOCAL_CERTS_DIR") }}'
docker_login_username: '{{ lookup("env", "DOCKER_REGISTRY_USERNAME") }}'
docker_login_password: '{{ lookup("env", "DOCKER_REGISTRY_PASSWORD") }}'
docker_app_image_name: dougppaz/r.oll.world-app
docker_app_image_tag: '{{ lookup("env", "DOCKER_APP_IMAGE_TAG") }}'
docker_app_image_tag: '{{ lookup("env", "DOCKER_APP_IMAGE_TAG") | lookup("env", "GITHUB_SHA") }}'
docker_statics_image_name: dougppaz/r.oll.world-statics
docker_statics_image_tag: '{{ lookup("env", "DOCKER_STATICS_IMAGE_TAG") }}'
docker_statics_image_tag: '{{ lookup("env", "DOCKER_STATICS_IMAGE_TAG") | lookup("env", "GITHUB_SHA") }}'

0 comments on commit 10939c4

Please sign in to comment.