Docker-compose definition#3
Conversation
|
Api server can be started but will stop after sometime and shows the following error: @ablachair Can you have a look? It is more like a JWT key missing error, but I did add volumes and copied the keys into the container. |
| - ./server:/app | ||
| - server-log:/logs | ||
| environment: | ||
| - LEAF_APP_DB=db,1433;Database=LeafDB;uid=sa;Password=Th3PA55--8zz |
There was a problem hiding this comment.
It looks like something in parsing this env var is splitting on =... You might want to run the container with bash to confirm the env vars.
|
temporary readme: |
| server: | ||
| build: ./server | ||
| image: leaf_api | ||
| container_name: leaf_api_demo | ||
| ports: | ||
| - 5001:5001 | ||
| volumes: | ||
| - ./server/keys:/.keys | ||
| - ./server:/app | ||
| - server-log:/logs | ||
| environment: | ||
| LEAF_APP_DB: "Server=db,1433;Database=LeafDB;uid=sa;Password=Th3PA55--8zz" | ||
| LEAF_CLIN_DB: "Server=db,1433;Database=TestDB;uid=sa;Password=Th3PA55--8zz" | ||
| LEAF_JWT_KEY_PW: "password" | ||
| networks: | ||
| - leaf | ||
| depends_on: | ||
| - db |
There was a problem hiding this comment.
| server: | |
| build: ./server | |
| image: leaf_api | |
| container_name: leaf_api_demo | |
| ports: | |
| - 5001:5001 | |
| volumes: | |
| - ./server/keys:/.keys | |
| - ./server:/app | |
| - server-log:/logs | |
| environment: | |
| LEAF_APP_DB: "Server=db,1433;Database=LeafDB;uid=sa;Password=Th3PA55--8zz" | |
| LEAF_CLIN_DB: "Server=db,1433;Database=TestDB;uid=sa;Password=Th3PA55--8zz" | |
| LEAF_JWT_KEY_PW: "password" | |
| networks: | |
| - leaf | |
| depends_on: | |
| - db | |
| db: | |
| extends: | |
| file: docker-compose.yml | |
| service: server | |
| volumes: | |
| - ./server/keys:/.keys | |
| - ./server:/app |
There was a problem hiding this comment.
services with 'depends_on' cannot be extended
| ui-client: | ||
| build: | ||
| context: ./ui-client | ||
| dockerfile: Dockerfile-dev | ||
| container_name: leaf_ui | ||
| ports: | ||
| - 3000:3000 | ||
| volumes: | ||
| - ./ui-client:/app | ||
| networks: | ||
| - leaf | ||
| stdin_open: true | ||
| depends_on: | ||
| - db | ||
| - server |
There was a problem hiding this comment.
This one we might define without extends? Or we could use extends if we serve both dev and prod versions on port 3000
There was a problem hiding this comment.
services with 'depends_on' cannot be extended
| environment: | ||
| - LEAF_APP_DB=${LEAF_APP_DB} | ||
| - LEAF_CLIN_DB=${LEAF_CLIN_DB} | ||
| - LEAF_JWT_KEY_PW=${LEAF_JWT_KEY_PW} | ||
| - UnsecuredIsAdmin=${UnsecuredIsAdminDev} | ||
| networks: | ||
| - leaf | ||
| depends_on: | ||
| - db |
There was a problem hiding this comment.
Do we need this all with extends?
There was a problem hiding this comment.
"services with 'depends_on' cannot be extended"
There was a problem hiding this comment.
Yes, they will need to be in a separate "common services" file.


db and ui are working in this dev version, despite that the very long time ui container takes to start.