Some question(discuss) for docker-compose.yml of lucky 1.0.0. #1791
-
Question 1: Why we not use docker-compose short syntax for volumes? e.g. volumes:
- type: bind
source: .
target: /app
- type: volume
source: node_modules
target: /app/node_modules
- type: volume
source: shards_lib
target: /app/lib Can be replace with:
Question 2: In fact, i don't understood, we have been bind mounted the Question 3: As discuss in this SO answer, we can add a POSTGRES_DB env to make docker-compose create pg database automatically when docker-compose run, following is a example:
This will make install Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
I found the postgres container will create database automatically if match following two conditions:
lucky cli generated docker-compose use this hack.
But i consider this is a code bad smell to use this black technology. |
Beta Was this translation helpful? Give feedback.
No, i tested it, after change that line,
docker-compose up
still not work, thatlucky:
only stand for host name which other container connect to app, but in the url, we need the database name, they are not alias?