v1.0.3 - Simple PHP support! 🎉 (#15)

- Basic PHP support.
- Cosmetic things here and there.
- Fix publish directory option.
This commit is contained in:
Andras Bacsai
2021-04-02 15:05:23 +02:00
committed by GitHub
parent 767c65ab10
commit 5573187d43
15 changed files with 6593 additions and 140 deletions

View File

@@ -64,16 +64,11 @@ module.exports = async function (configuration, configChanged, imageChanged) {
await saveAppLog('### Publishing.', configuration)
await fs.writeFile(`${configuration.general.workdir}/stack.yml`, yaml.dump(stack))
// TODO: Compare stack.yml with the currently running one to upgrade if something changes, like restart_policy
if (configChanged) {
// console.log('configuration changed')
await execShellAsync(
`cat ${configuration.general.workdir}/stack.yml | docker stack deploy --prune -c - ${containerName}`
)
} else if (imageChanged) {
if (imageChanged) {
// console.log('image changed')
await execShellAsync(`docker service update --image ${configuration.build.container.name}:${configuration.build.container.tag} ${configuration.build.container.name}_${configuration.build.container.name}`)
} else {
// console.log('new deployment or force deployment')
// console.log('new deployment or force deployment or config changed')
await deleteSameDeployments(configuration)
await execShellAsync(
`cat ${configuration.general.workdir}/stack.yml | docker stack deploy --prune -c - ${containerName}`