Production target for Dockerfile (#57)

* add production build

* add back updates and use slim image

* udpate command

* ignore scripts

* add workdir

* fix workdirs

* docker image improvements

* use .example instead

* use dummy data instead

* remove unused env var and add comment

* fix entrypoints

* change name of script and add possibility for different commands

* change to safer default for volume

* add instructions for the dev docker container

* update copy

* add empty lines under topics to keep uniformity

* most RUN's in a single command

* add comment about volumes for dev target

* remove dev workflow

* remove dev workflow from readme

* Prettify README

---------

Co-authored-by: Sebastien Castiel <sebastien@castiel.me>
This commit is contained in:
Lauri Vuorela
2024-01-29 01:30:26 +01:00
committed by GitHub
parent d43e731fe1
commit 9759f61e0e
4 changed files with 21 additions and 11 deletions

View File

@@ -3,6 +3,13 @@
SPLIIT_APP_NAME=$(node -p -e "require('./package.json').name")
SPLIIT_VERSION=$(node -p -e "require('./package.json').version")
docker buildx build --no-cache -t ${SPLIIT_APP_NAME}:${SPLIIT_VERSION} -t ${SPLIIT_APP_NAME}:latest .
# we need to set dummy data for POSTGRES env vars in order for build not to fail
docker buildx build \
--no-cache \
--build-arg POSTGRES_PRISMA_URL=postgresql://build:@db \
--build-arg POSTGRES_URL_NON_POOLING=postgresql://build:@db \
-t ${SPLIIT_APP_NAME}:${SPLIIT_VERSION} \
-t ${SPLIIT_APP_NAME}:latest \
.
docker image prune -f

View File

@@ -1,5 +1,3 @@
#!/bin/bash
prisma migrate deploy
prisma generate
npm run dev
npm run start