mirror of
https://github.com/penpot/penpot.git
synced 2025-04-05 03:21:26 -05:00
💚 Fix build and docker-compose run
This commit is contained in:
parent
e464fc4714
commit
88fff9e48b
3 changed files with 11 additions and 12 deletions
|
@ -6,7 +6,7 @@ volumes:
|
|||
uxbox_db:
|
||||
|
||||
services:
|
||||
uxbox_db:
|
||||
db:
|
||||
image: postgres:latest
|
||||
restart: always
|
||||
ports:
|
||||
|
@ -18,10 +18,10 @@ services:
|
|||
volumes:
|
||||
- uxbox_db:/var/lib/postgresql/data
|
||||
|
||||
uxbox_backend:
|
||||
backend:
|
||||
build: ./backend
|
||||
#image: monogramm/uxbox:backend
|
||||
restart: always
|
||||
#restart: always
|
||||
depends_on:
|
||||
- uxbox_db
|
||||
ports:
|
||||
|
@ -47,13 +47,13 @@ services:
|
|||
- "UXBOX_DB_USER=uxbox"
|
||||
- "UXBOX_DB_PASSWORD=youshouldoverwritethiswithsomethingelse"
|
||||
- "UXBOX_DB_NAME=uxbox"
|
||||
- "UXBOX_DB_HOST=uxbox_db"
|
||||
- "UXBOX_DB_HOST=db"
|
||||
- "UXBOX_DB_PORT=5432"
|
||||
|
||||
uxbox_frontend:
|
||||
frontend:
|
||||
build: ./frontend
|
||||
#image: monogramm/uxbox:frontend
|
||||
restart: always
|
||||
#restart: always
|
||||
depends_on:
|
||||
- uxbox_backend
|
||||
ports:
|
||||
|
|
|
@ -71,6 +71,9 @@ EXPOSE 3449
|
|||
EXPOSE 6060
|
||||
EXPOSE 9090
|
||||
|
||||
RUN useradd -m -g users -s /bin/bash uxbox; \
|
||||
passwd uxbox -d; \
|
||||
echo "uxbox ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers; \
|
||||
USER uxbox
|
||||
|
||||
COPY files/lein /home/uxbox/.local/bin/lein
|
||||
|
|
|
@ -69,22 +69,18 @@ function release_local {
|
|||
function release_image {
|
||||
echo "Building frontend release..."
|
||||
rm -rf ./frontend/dist ./frontend/node_modules ./frontend/dist
|
||||
sudo docker build --rm=true -t $IMGNAME-frontend:$REV frontend/
|
||||
sudo docker build --rm=true -t ${IMGNAME}_frontend:$REV frontend/
|
||||
echo "Frontend release image generated"
|
||||
|
||||
echo "Building backend release..."
|
||||
rm -rf ./backend/dist
|
||||
sudo docker build --rm=true -t $IMGNAME-backend:$REV backend/
|
||||
sudo docker build --rm=true -t ${IMGNAME}_backend:$REV backend/
|
||||
echo "Backend release image generated"
|
||||
}
|
||||
|
||||
function run_release {
|
||||
kill_container
|
||||
|
||||
if ! $(sudo docker images | grep $IMGNAME-frontend | grep -q $REV); then
|
||||
release_image
|
||||
fi
|
||||
|
||||
echo "Running production images..."
|
||||
sudo docker-compose up -d
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue