change deployment to use docker-compose
This commit is contained in:
+6
-4
@@ -1,12 +1,14 @@
|
||||
services:
|
||||
urlshort:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
image: python:3.11-slim
|
||||
working_dir: /app
|
||||
command: ["python", "-u", "urlshort.py", "config.json"]
|
||||
ports:
|
||||
- "8080:8080"
|
||||
volumes:
|
||||
# Persist the SQLite database outside the container
|
||||
- ./urlshort.py:/app/urlshort.py:ro
|
||||
- ./config.json:/app/config.json:ro
|
||||
- ./static:/app/static:ro
|
||||
- ./data:/app/data
|
||||
restart: unless-stopped
|
||||
|
||||
|
||||
Reference in New Issue
Block a user