feat: add docker-compose file & update env.example

This commit is contained in:
Shun Yuan 2024-05-04 20:15:55 +08:00
parent 81e5ea02ac
commit c04f9378c3
2 changed files with 28 additions and 2 deletions

View File

@ -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=""

26
docker-compose.dev.yaml Normal file
View File

@ -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