Missing well-known files
[wolnelektury.git] / docker-compose.yml
index b01e970..025589f 100644 (file)
@@ -1,7 +1,7 @@
 x-app-base: &app-base
   build:
     context: .
-    target: dev
+    target: deps
     args:
       UID: ${UID:-1000}
       GID: ${GID:-1000}
@@ -17,6 +17,7 @@ x-app-base: &app-base
    - ./var/counters/:/app/var/counters
    - ${LIBRARIAN:-/nonexistent}:/${LIBRARIAN:+edita}ble/librarian
    - ipython:/app/.ipython
+   - ./var/.bash_history:/app/.bash_history
   depends_on:
    - db
    - redis
@@ -26,7 +27,10 @@ x-app-base: &app-base
 services:
   web:
     <<: *app-base
-    command: ./manage.py runserver 0.0.0.0:8000
+    command: python -Wall ./manage.py runserver 0.0.0.0:8000
+    ports:
+      # Dev: use http://localhost:8000/ directly
+      - "8000:8000"
 
   celery:
     <<: *app-base
@@ -48,6 +52,9 @@ services:
     image: memcached:1.6-alpine
 
   nginx:
+    # Just for testing production-like environment.
+    # docker compose --profile nginx up
+    profiles: ["nginx"]
     build:
       context: .
       target: nginx
@@ -58,7 +65,7 @@ services:
       - "127.0.0.1:8101:80"
     volumes:
       - ./var/media:/app/var/media:ro
-      - ./scripts/nginx.conf:/etc/nginx/conf.d/default.conf:ro
+      - ./scripts/nginx/nginx.conf:/etc/nginx/conf.d/default.conf:ro
     depends_on:
       - web