Merge pull request #169 from tanshunyuan/164/add-docker-compose
Add docker compose file for local development
This commit is contained in:
commit
eb7add2587
|
|
@ -1,5 +1,5 @@
|
|||
DATABASE_URL=""
|
||||
REDIS_URL=""
|
||||
DATABASE_URL="postgres://<user>:<password>@<host>:<port>/<database_name>"
|
||||
REDIS_URL="redis://<host>:<port>"
|
||||
UPLOAD_DIRECTORY=""
|
||||
NEXT_PUBLIC_UPLOAD_STATIC_DIRECTORY=""
|
||||
STRIPE_PUBLISHABLE_KEY=""
|
||||
|
|
|
|||
|
|
@ -87,6 +87,12 @@ npm run prisma-db-push
|
|||
```
|
||||
</Step>
|
||||
|
||||
<Step title="Setup postgres & redis via docker compose">
|
||||
```bash Terminal
|
||||
docker compose -f "docker-compose.dev.yaml" up
|
||||
```
|
||||
</Step>
|
||||
|
||||
<Step title="Run the project">
|
||||
```bash Terminal
|
||||
npm run dev
|
||||
|
|
|
|||
|
|
@ -0,0 +1,26 @@
|
|||
version: '3.9'
|
||||
|
||||
services:
|
||||
gitroom-postgres:
|
||||
image: postgres:14.5
|
||||
container_name: gitroom-postgres
|
||||
restart: always
|
||||
environment:
|
||||
POSTGRES_PASSWORD: gitroom-local-pwd
|
||||
POSTGRES_USER: gitroom-local
|
||||
POSTGRES_DB: gitroom-db-local
|
||||
volumes:
|
||||
- postgres-volume:/var/lib/postgresql/data
|
||||
ports:
|
||||
- 5432:5432
|
||||
gitroom-redis:
|
||||
image: redis:7.2
|
||||
container_name: gitroom-redis
|
||||
restart: always
|
||||
ports:
|
||||
- 6379:6379
|
||||
|
||||
|
||||
volumes:
|
||||
postgres-volume:
|
||||
external: false
|
||||
Loading…
Reference in New Issue