Browse Source

it's working

Bachir Soussi Chiadmi 1 year ago
parent
commit
9ef4727009
3 changed files with 43 additions and 0 deletions
  1. 2 0
      Docker/app/entrypoint.sh
  2. 40 0
      Makefile
  3. 1 0
      docker-compose.yml

+ 2 - 0
Docker/app/entrypoint.sh

@@ -7,5 +7,7 @@ echo "Npm install"
 cd /app
 npm install
 
+npm rebuild node-sass
+
 echo "Run npm dev"
 npm run dev

+ 40 - 0
Makefile

@@ -0,0 +1,40 @@
+#!/usr/bin/make
+
+SHELL = /bin/sh
+
+USER_UID := $(shell id -u)
+USER_UNAME := $(shell id -un)
+USER_GID := $(shell id -g)
+USER_GNAME := $(shell id -gn)
+
+export USER_UID
+export USER_UNAME
+export USER_GID
+export USER_GNAME
+
+build:
+		docker-compose build --build-arg USER_UID=$(USER_UID) --build-arg USER_UNAME=$(USER_UNAME) --build-arg USER_GID=$(USER_GID) --build-arg USER_GNAME=$(USER_GNAME)
+
+buildnc:
+		docker-compose build --no-cache --build-arg USER_UID=$(USER_UID) --build-arg USER_UNAME=$(USER_UNAME) --build-arg USER_GID=$(USER_GID) --build-arg USER_GNAME=$(USER_GNAME)
+
+up:
+		docker-compose up
+
+upd:
+		docker-compose up -d
+
+upbuild:
+		docker-compose up -d --build
+
+ps:
+		docker-compose ps
+
+logs:
+		docker-compose logs -f
+
+down:
+		docker-compose down
+
+exec_app:
+		docker exec -it offline_timeline_app_1 sh

+ 1 - 0
docker-compose.yml

@@ -2,6 +2,7 @@ version: '3.7'
 services:
   app:
     build: ./Docker/app
+    user: ${USER_UID}:${USER_GID}
     volumes:
       - "${APP_ROOT}:/app"
     ports: