From 3ebe2701806874c82592614ca3223029ac78f525 Mon Sep 17 00:00:00 2001 From: Christian Muise Date: Tue, 6 Aug 2024 23:36:01 -0400 Subject: [PATCH] Small (but hard to find) fix for root-created DB files. --- server/Makefile | 8 ++++++-- server/docker-compose.yml | 3 +-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/server/Makefile b/server/Makefile index a4974ef..6c061cc 100644 --- a/server/Makefile +++ b/server/Makefile @@ -1,7 +1,11 @@ + all : build-planutils-image build-start build-planutils-image: docker build -t paas:latest . -build-start: # install and start - docker compose --compatibility up -d --build +db-data: + mkdir -p db_data + +build-start: db-data + CURRENT_USER_ID="$(shell id -u)" CURRENT_GROUP_ID="$(shell id -g)" docker compose --compatibility up -d --build diff --git a/server/docker-compose.yml b/server/docker-compose.yml index 77be921..697daad 100644 --- a/server/docker-compose.yml +++ b/server/docker-compose.yml @@ -1,6 +1,5 @@ services: frontend: - privileged: true build: context: ./frontend dockerfile: Dockerfile @@ -11,7 +10,6 @@ services: # volumes: # - /etc/letsencrypt:/etc/letsencrypt web: - privileged: true build: context: ./api dockerfile: Dockerfile @@ -75,3 +73,4 @@ services: volumes: - ./init:/docker-entrypoint-initdb.d - ./db_data:/var/lib/mysql + user: ${CURRENT_USER_ID:-1000}:${CURRENT_GROUP_ID:-1000}