Commit | Line | Data |
---|---|---|
e56a65f6 MB |
1 | # A container for all things Data, be sure to set a secret password for |
2 | # discourse account, SOME_SECRET is just an example | |
80c11be3 | 3 | # |
e56a65f6 | 4 | |
67a25ebf | 5 | templates: |
67a25ebf SS |
6 | - "templates/postgres.template.yml" |
7 | - "templates/redis.template.yml" | |
8 | - "templates/sshd.template.yml" | |
9 | ||
10 | expose: | |
11 | - "5432:5432" | |
12 | - "6379:6379" | |
13 | - "2221:22" | |
14 | ||
2f9bf9d0 PG |
15 | # any extra arguments for Docker? |
16 | # docker_args: | |
17 | ||
e56a65f6 MB |
18 | params: |
19 | db_default_text_search_config: "pg_catalog.english" | |
80a6f24a S |
20 | |
21 | ## Set db_shared_buffers to a max of 25% of the total memory. | |
22 | ## | |
23 | ## On 1GB installs set to 128MB (to leave room for other processes) | |
24 | ## on a 4GB instance you may raise to 1GB | |
e56a65f6 | 25 | #db_shared_buffers: "256MB" |
80a6f24a S |
26 | # |
27 | ## Set higher on large instances it defaults to 10MB, for a 3GB install 40MB is a good default | |
28 | ## this improves sorting performance, but adds memory usage per-connection | |
29 | #db_work_mem: "40MB" | |
30 | # | |
e56a65f6 | 31 | |
3cb3d9c4 S |
32 | env: |
33 | # ensure locale exists in container, you may need to install it | |
34 | LANG: en_US.UTF-8 | |
35 | ||
67a25ebf SS |
36 | volumes: |
37 | - volume: | |
be82e068 | 38 | host: /var/discourse/shared/data |
67a25ebf | 39 | guest: /shared |
be82e068 S |
40 | - volume: |
41 | host: /var/discourse/shared/data/log/var-log | |
42 | guest: /var/log | |
e56a65f6 MB |
43 | |
44 | # TODO: SOME_SECRET to a password for the discourse user | |
45 | hooks: | |
46 | after_postgres: | |
47 | - exec: | |
48 | stdin: | | |
49 | alter user discourse with password 'SOME_SECRET'; | |
50 | cmd: su - postgres -c 'psql discourse' | |
51 | ||
52 | raise_on_fail: false |