feat: Add docker deployment
This commit is contained in:
26
docker-compose.yml
Normal file
26
docker-compose.yml
Normal file
@@ -0,0 +1,26 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
miniquiz-ui:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: miniquiz-ui
|
||||
ports:
|
||||
- "3000:3000"
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- NEXT_TELEMETRY_DISABLED=1
|
||||
- NEXT_PUBLIC_MINIQUIZ_TITLE=${NEXT_PUBLIC_MINIQUIZ_TITLE}
|
||||
- NEXT_PUBLIC_MINIQUIZ_QUESTION=${NEXT_PUBLIC_MINIQUIZ_QUESTION}
|
||||
- NEXT_PUBLIC_MINIQUIZ_OPTIONS=${NEXT_PUBLIC_MINIQUIZ_OPTIONS}
|
||||
- NEXT_PUBLIC_MINIQUIZ_ANSWER=${NEXT_PUBLIC_MINIQUIZ_ANSWER}
|
||||
- NEXT_PUBLIC_MINIQUIZ_NEXTURL=${NEXT_PUBLIC_MINIQUIZ_NEXTURL}
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 40s
|
||||
|
||||
Reference in New Issue
Block a user