fixes
[wolnelektury.git] / docker-compose.yml
index b01e970..afa1786 100644 (file)
@@ -1,7 +1,7 @@
 x-app-base: &app-base
   build:
     context: .
 x-app-base: &app-base
   build:
     context: .
-    target: dev
+    target: deps
     args:
       UID: ${UID:-1000}
       GID: ${GID:-1000}
     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/counters/:/app/var/counters
    - ${LIBRARIAN:-/nonexistent}:/${LIBRARIAN:+edita}ble/librarian
    - ipython:/app/.ipython
+   - ./var/.bash_history:/app/.bash_history
   depends_on:
    - db
    - redis
   depends_on:
    - db
    - redis
@@ -26,7 +27,10 @@ x-app-base: &app-base
 services:
   web:
     <<: *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
+      - "127.0.0.1:8000:8000"
 
   celery:
     <<: *app-base
 
   celery:
     <<: *app-base
@@ -48,6 +52,9 @@ services:
     image: memcached:1.6-alpine
 
   nginx:
     image: memcached:1.6-alpine
 
   nginx:
+    # Just for testing production-like environment.
+    # docker compose --profile nginx up
+    profiles: ["nginx"]
     build:
       context: .
       target: nginx
     build:
       context: .
       target: nginx