3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-10 20:35:02 +00:00

docker: allow configuring UID/GID used inside the containers

This commit is contained in:
Dragory 2022-08-07 12:23:27 +03:00
parent ad1f5b8fde
commit 22d0b14ef1
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
3 changed files with 35 additions and 8 deletions

View file

@ -26,39 +26,51 @@ services:
command: --authentication-policy=mysql_native_password
prepare_backend:
image: node:16.16
build:
context: ./docker/production/node
args:
DOCKER_USER_UID: ${DOCKER_USER_UID:?Missing DOCKER_USER_UID}
DOCKER_USER_GID: ${DOCKER_USER_GID:?Missing DOCKER_USER_GID}
depends_on:
- mysql
volumes:
- ./:/zeppelin
user: node
command: |-
bash -c "cd /zeppelin/backend && npm ci && npm run build && npm run migrate-prod"
api:
image: node:16.16
build:
context: ./docker/production/node
args:
DOCKER_USER_UID: ${DOCKER_USER_UID:?Missing DOCKER_USER_UID}
DOCKER_USER_GID: ${DOCKER_USER_GID:?Missing DOCKER_USER_GID}
restart: on-failure
depends_on:
- prepare_backend
volumes:
- ./:/zeppelin
user: node
command: ["/bin/bash", "/zeppelin/docker/production/start-api.sh"]
bot:
image: node:16.16
build:
context: ./docker/production/node
args:
DOCKER_USER_UID: ${DOCKER_USER_UID:?Missing DOCKER_USER_UID}
DOCKER_USER_GID: ${DOCKER_USER_GID:?Missing DOCKER_USER_GID}
restart: on-failure
depends_on:
- prepare_backend
volumes:
- ./:/zeppelin
user: node
command: ["/bin/bash", "/zeppelin/docker/production/start-bot.sh"]
build_dashboard:
image: node:16.16
build:
context: ./docker/production/node
args:
DOCKER_USER_UID: ${DOCKER_USER_UID:?Missing DOCKER_USER_UID}
DOCKER_USER_GID: ${DOCKER_USER_GID:?Missing DOCKER_USER_GID}
volumes:
- ./:/zeppelin
user: node
command: |-
bash -c "cd /zeppelin/dashboard && npm ci && npm run build"