Comments (3)
Hi @kaotika
I'm glad you liked this tool. The error you are getting happens when you neither mark a config as external (external: true
) or specify a file to load it from (file: index.html
). It will happen both in Portainer and in docker stack deploy
command.
According to the Compose file version 3 reference "The source of the config is either file
or external
". Portainer only supports external
configs, as it only accepts the stack file content and no additional files to load the configs from. You have to create the config first, then deploy/update the stack and reference the config as external (external: true
). So far, only the latest can be done through this tool so, you will have to create the config in Portainer by hand.
As you noted, the latest release (0.1.1) is a bit outdated, but it's still the most stable one and the recommended for production environments. In that version you could achieve the same result with:
./psu -a deploy -l https://docker.local.com -u USER -p PASSWORD -n test -c stack.1.yml
The version in master
branch has it's advantages, like zero external dependencies and a simpler sintax, but it's still unreleased and it's API is likely to suffer changes.
Nevertheles, this issue brings to light an interesting use case where one would want to deploy stacks with file
configs in Portainer (in a single step), just like you would do with docker stack deploy
command. It could be a nice addition to this project. From Portainer API docs:
Portainer DO NOT expose specific endpoints to manage your Docker resources (create a container, remove a volume, etc...).
Instead, it acts as a reverse-proxy to the Docker HTTP API. This means that you can execute Docker requests via the Portainer HTTP API.
from portainer-stack-utils.
Thanks for quick answer.
Seems I really missed the external: false
flag...my fault.
Are their any plans to support config/secret creation? If so I vote for it. 👍
from portainer-stack-utils.
There could be. Would you help me shape the idea? Like how would it look like, how would you use it, how does it work with similar tools, are there corner cases, a single file o several ones, which format...? Please fill a new issue with this info. I'm closing this one.
from portainer-stack-utils.
Related Issues (20)
- Better flags HOT 8
- Action as an argument HOT 1
- Help included in the script HOT 2
- Branching model with better support for releases HOT 2
- Error while deploying: bad substitution HOT 7
- Project rebranding HOT 9
- How do you use Portainer Stack Utils? HOT 7
- Migration to GitLab HOT 9
- Definition of "breaking change" HOT 1
- Use Portainer API data structures HOT 1
- Deploy stack with configs/secrets from file, manage configs/secrets HOT 13
- Version included in the script
- Endpoint's Docker API proxy HOT 1
- Proxy command doesn't handle websockets
- Continuous integration HOT 19
- Docker image docs HOT 1
- Script as entrypoint HOT 1
- Custom stack environment variables HOT 5
- Releases HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from portainer-stack-utils.