diff --git a/docker-compose.yaml.example b/docker-compose.yaml.example new file mode 100644 index 0000000..749286a --- /dev/null +++ b/docker-compose.yaml.example @@ -0,0 +1,37 @@ +version: "2.0" + +services: + # HTTP server configured to listen on 127.0.0.1:8080 + nginx: + build: + context: . + volumes_from: + - cms:ro + ports: + - 127.0.0.1:8080:80 + depends_on: + - api + - cms + + # API service with /data/quotes mounted as database storage + # SECRET_KEY is needed for API key validation + api: + build: + context: ./api + volumes: + - /data/quotes:/quotes + environment: + - SQLALCHEMY_DATABASE_URI=sqlite:////quotes/quotes.db + - SECRET_KEY=__SECRET_KEY__ + expose: + - 5000 + + # CMS service with /data/grav mounted as user data storage + cms: + build: + context: ./cms + volumes: + - /data/grav:/app/user + - /app + expose: + - 9000