fix data directory binding
This commit is contained in:
parent
8c65e5f0d4
commit
f29bd6f6c3
1 changed files with 9 additions and 4 deletions
|
@ -3,6 +3,11 @@ hedgedoc data directory exists:
|
|||
- name: /opt/hedgedoc/pg_data
|
||||
- makedirs: True
|
||||
|
||||
hedgedoc uploads directory exists:
|
||||
file.directory:
|
||||
- name: /opt/hedgedoc/uploads
|
||||
- makedirs: True
|
||||
|
||||
hedgedoc_docker_net_present:
|
||||
docker_network.present:
|
||||
- name: hedgedoc
|
||||
|
@ -13,7 +18,7 @@ hedgedoc_docker_present:
|
|||
- image: {{ salt['pillar.get']('hedgedoc:image:path', 'quay.io/hedgedoc/hedgedoc') }}:{{ salt['pillar.get']('hedgedoc:image:version', '1.10.0') }}
|
||||
- container: hedgedoc
|
||||
- environment:
|
||||
- CMD_DB_URL: "postgres://codimd:password@database:5432/codimd"
|
||||
- CMD_DB_URL: "postgres://codimd:password@hedgedocdatabase:5432/codimd"
|
||||
- CMD_USECDN: "false"
|
||||
- CMD_DOMAIN: "pad.flipdot.org"
|
||||
- CMD_URL_ADDPORT: "false"
|
||||
|
@ -35,7 +40,7 @@ hedgedoc_docker_present:
|
|||
- CMD_OAUTH2_SCOPE: "openid email profile"
|
||||
- networks:
|
||||
- hedgedoc
|
||||
- volumes:
|
||||
- binds:
|
||||
- /opt/hedgedoc/uploads:/hedgedoc/public/uploads
|
||||
- port_bindings:
|
||||
- "{{ salt['pillar.get']('hedgedoc:container_web_port', "127.0.0.1:3000") }}:3000"
|
||||
|
@ -43,7 +48,7 @@ hedgedoc_docker_present:
|
|||
|
||||
hedgedoc_database_present:
|
||||
docker_container.running:
|
||||
- name: database
|
||||
- name: hedgedocdatabase
|
||||
- image: postgres:{{ salt['pillar.get']('hedgedoc:postgres:version', '16-alpine') }}
|
||||
- environment:
|
||||
- POSTGRES_USER: codimd
|
||||
|
@ -51,6 +56,6 @@ hedgedoc_database_present:
|
|||
- POSTGRES_DB: codimd
|
||||
- networks:
|
||||
- hedgedoc
|
||||
- volumes:
|
||||
- binds:
|
||||
- /opt/hedgedoc/pg_data:/var/lib/postgresql/data
|
||||
- restart: always
|
||||
|
|
Loading…
Reference in a new issue