Browse Source

Persist volumes by default in docker-compose (#9055)

Too many databases were lost to this
Eugen Rochko 1 month ago
parent
commit
969a10a5d1
No account linked to committer's email address
1 changed files with 7 additions and 10 deletions
  1. 7
    10
      docker-compose.yml

+ 7
- 10
docker-compose.yml View File

@@ -6,18 +6,16 @@ services:
6 6
     image: postgres:9.6-alpine
7 7
     networks:
8 8
       - internal_network
9
-### Uncomment to enable DB persistence
10
-#    volumes:
11
-#      - ./postgres:/var/lib/postgresql/data
9
+    volumes:
10
+      - ./postgres:/var/lib/postgresql/data
12 11
 
13 12
   redis:
14 13
     restart: always
15 14
     image: redis:4.0-alpine
16 15
     networks:
17 16
       - internal_network
18
-### Uncomment to enable REDIS persistence
19
-#    volumes:
20
-#      - ./redis:/data
17
+    volumes:
18
+      - ./redis:/data
21 19
 
22 20
 #  es:
23 21
 #    restart: always
@@ -26,9 +24,8 @@ services:
26 24
 #      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
27 25
 #    networks:
28 26
 #      - internal_network
29
-#### Uncomment to enable ES persistence
30
-##    volumes:
31
-##      - ./elasticsearch:/usr/share/elasticsearch/data
27
+#    volumes:
28
+#      - ./elasticsearch:/usr/share/elasticsearch/data
32 29
 
33 30
   web:
34 31
     build: .
@@ -68,7 +65,7 @@ services:
68 65
     image: tootsuite/mastodon
69 66
     restart: always
70 67
     env_file: .env.production
71
-    command: bundle exec sidekiq -q default -q push -q mailers -q pull
68
+    command: bundle exec sidekiq
72 69
     depends_on:
73 70
       - db
74 71
       - redis