Skip to content

Commit

Permalink
testing docker env don. TODO: migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
Qwelian Tanner authored and Qwelian Tanner committed May 20, 2024
1 parent fb36a68 commit 34df4d6
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ yarn-error.log*

# local env files
.env*.local
.env*.testing

# vercel
.vercel
Expand Down
24 changes: 24 additions & 0 deletions docker-compose.test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
services:
app:
build:
context: .
args:
- PACKAGE=core
image: core
env_file:
- core/.env.testing
restart: unless-stopped
depends_on:
- postgres
ports:
- 8000:8000
postgres:
image: postgres:15.1
restart: unless-stopped
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: testing
POSTGRE_HOST_AUTH_METHOD: trust
ports:
- 5432:5432
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"lint:fix": "turbo lint --continue -- --fix --cache --cache-location node_modules/.cache/.eslintcache",
"lint:ws": "pnpm dlx sherif@latest",
"test": "turbo test",
"fix": "pnpm run lint:fix && pnpm run format:fix"
"fix": "pnpm run lint:fix && pnpm run format:fix",
"test-env": "sudo docker compose -f docker-compose.test.yml up -d"
},
"devDependencies": {
"@babel/core": "^7.22.17",
Expand Down

0 comments on commit 34df4d6

Please sign in to comment.