Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- services:
- postgres:
- image: my_node_app
- ports: -8080:8080
- environment:
- APP_PASSWORD: mypassword
- ...
- #!/bin/bash
- get_credential <server> <dev-environment> <role> <key>
- FROM node:4-slim
- MAINTAINER myself
- # ... do Dockerfile stuff
- # TRIAL #1: run a bash script to set the environment varable --- UNSUCCESSFUL!
- COPY set_en_var.sh /
- RUN chmod +x /set_en_var.sh
- RUN /bin/bash /set_en_var.sh
- # original entry point
- #ENTRYPOINT ["node", "mynodeapp.js", "configuration.js"]
- # TRIAL #2: use a bash script as entrypoint that sets
- # the environment variable and runs my node app . --- UNSUCCESSFUL TOO!
- ENTRYPOINT ["/entrypoint.sh"]
- . mybashclient.sh
- cred_str=$(get_credential <server> <dev-environment> <role> <key>
- export APP_PASSWORD=( $cred_str )
- # run the original entrypoint command
- node mynodeapp.js configuration.js
- . mybashclient.sh
- cred_str=$(get_credential <server> <dev-environment> <role> <key>
- export APP_PASSWORD=( $cred_str )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement