Skip to content

Commit

Permalink
feat: Docker image name and port env var
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-dalmet committed Oct 5, 2023
1 parent fe16e49 commit ccd8ea1
Show file tree
Hide file tree
Showing 3 changed files with 896 additions and 6 deletions.
5 changes: 4 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ NEXT_PUBLIC_BASE_URL="http://localhost:3000"
NEXT_PUBLIC_DEV_ENV_NAME="staging"
NEXT_PUBLIC_DEV_ENV_COLOR_SCHEME="teal"

# PRISMA
# DATABASE
DATABASE_URL="postgres://startui:startui@localhost:5432/startui"
DATABASE_DOCKER_IMAGE_NAME="start-ui-db"
DATABASE_DOCKER_IMAGE_PORT="5432"

# DEMO
NEXT_PUBLIC_IS_DEMO="false"
Expand All @@ -17,5 +19,6 @@ AUTH_SECRET="Replace me with `openssl rand -base64 32` generated secret"
EMAIL_SERVER="smtp://username:password@localhost:1025"
EMAIL_FROM="Start UI <[email protected]>"

# LOGGER
LOGGER_LEVEL="info"
LOGGER_PRETTY="true"
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
"theme:generate-icons": "svgr --config-file src/components/Icons/svgr.config.js src/components/Icons/svg-sources",
"e2e": "playwright test",
"e2e:ui": "playwright test --ui",
"db:init": "docker run --name startui -e POSTGRES_PASSWORD=startui -e POSTGRES_USER=startui -e POSTGRES_DB=startui -p 5432:5432 -d postgres && sleep 10 && pnpm db:push && pnpm db:seed",
"db:start": "docker start startui",
"db:stop": "docker stop startui",
"db:clear": "docker stop startui && docker rm startui",
"db:init": "dotenv -- cross-var docker run --name %DATABASE_DOCKER_IMAGE_NAME% -e POSTGRES_PASSWORD=startui -e POSTGRES_USER=startui -e POSTGRES_DB=startui -p %DATABASE_DOCKER_IMAGE_PORT%:5432 -d postgres && sleep 10 && pnpm db:push && pnpm db:seed",
"db:start": "dotenv -- cross-var docker start %DATABASE_DOCKER_IMAGE_NAME%",
"db:stop": "dotenv -- cross-var docker stop %DATABASE_DOCKER_IMAGE_NAME%",
"db:clear": "dotenv -- cross-var docker stop %DATABASE_DOCKER_IMAGE_NAME% && dotenv -- cross-var docker rm %DATABASE_DOCKER_IMAGE_NAME%",
"db:push": "prisma db push",
"db:ui": "prisma studio",
"db:seed": "prisma db seed"
Expand Down Expand Up @@ -110,6 +110,8 @@
"@types/react-dom": "18.2.7",
"@types/swagger-ui-react": "4.18.1",
"@typescript-eslint/eslint-plugin": "6.7.2",
"cross-var": "1.1.0",
"dotenv-cli": "7.3.0",
"eslint": "8.49.0",
"eslint-config-next": "13.5.3",
"eslint-plugin-sonarjs": "0.21.0",
Expand Down
Loading

1 comment on commit ccd8ea1

@vercel
Copy link

@vercel vercel bot commented on ccd8ea1 Oct 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.