Skip to content

Commit

Permalink
devcontainer: migrate only when the container is first created
Browse files Browse the repository at this point in the history
  • Loading branch information
MrPandir committed Jul 7, 2024
1 parent 68deb68 commit 4c691dd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {}
},

"onCreateCommand": "pnpm run db:seed",
"onCreateCommand": "pnpm run db:migrate:dev && pnpm run db:seed",

"postCreateCommand": "echo alias dudes=\\'docker compose -p dudes -f compose.dev.yaml\\' >> ~/.bashrc; bash",

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ RUN --mount=type=cache,target=/root/.local/share/pnpm/ \
npm install -g pnpm && pnpm install && npx nx reset
ENV PATH /app/node_modules/.bin:$PATH
COPY . .
CMD pnpm run db:migrate:dev && pnpm run dev --host 0.0.0.0 --inspect
CMD pnpm run dev --host 0.0.0.0 --inspect

0 comments on commit 4c691dd

Please sign in to comment.