Skip to content

Commit

Permalink
fix(do/swarm-workers): fix config
Browse files Browse the repository at this point in the history
  • Loading branch information
opichon committed Feb 17, 2025
1 parent 083d44f commit 4775aed
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
config:
aws:region: ap-southeast-1
<%= projectName %>:count: "1"
# <%= projectName %>:count: "1"
<%= projectName %>:image: docker-20-04
<%= projectName %>:name: <%= prefix %>-<%= environment %>
<%= projectName %>:pathToSshKeysFolder: "../../ssh-keys"
Expand All @@ -17,4 +16,4 @@ config:
<%= projectName %>:userGroups: group1,group2
<%= projectName %>:username: USERNAME
# <%= projectName %>:vpcUuid: VPC UUID
# <%= projectName %>:vpcStack: <%= prefix %>-do-resources
# <%= projectName %>:vpcStack: <%= prefix %>-do-resources
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
users:
{% for user in users %}
- name: {{ user.username }}
groups: {{ user.groups }}
groups: docker{% if user.groups %},{{ user.groups }}{% endif %}
shell: /bin/bash
sudo: ['ALL=(ALL) NOPASSWD:ALL']
ssh-authorized-keys:
Expand Down Expand Up @@ -47,4 +47,4 @@ runcmd:
{% for volume
in volumes %}
- chown -R {{ volume.user }}:{{ volume.group }} {{ volume.path }}
{% endfor %}
{% endfor %}
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const getConfig = async () => {
}

return {
count: stackConfig.requireNumber("count"),
count: stackConfig.getNumber("count") || 1,
image: stackConfig.require("image"),
name: stackConfig.get("name") || stack,
packages,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export = async () => {
};

// Desired worker count
const count = config.count || 1;
const count = config.count;

const workers = [];

Expand Down

0 comments on commit 4775aed

Please sign in to comment.