mirror of https://github.com/snachodog/mybuddy.git
Update docker compose files for Portainer compatibility (#179)
* Update docker-compose.example.sqlite.yml Add inline comments, tweak version to 2.4 for Portainer compatibility, add friendly container name. * Update docker-compose.example.sqlite.yml Add restart: unless-stopped * Update docker-compose.example.yml Update with more inline notes, friendly container names, and portainer deployment notes. Add "unless-stopped" restart parameter for auto restarting of containers. * Update docker-compose.example.yml Resolve pull comments * Update docker-compose.example.sqlite.yml Resolve pull comments * Update docker-compose.example.yml Adjust spacing of inline comments * Update docker-compose.example.yml Change back to DB_PASSWORD to conform to latest rebase of master * Update docker-compose.example.sqlite.yml * Update docker-compose.example.yml
This commit is contained in:
parent
4733ec0b83
commit
1b3f87ad8c
|
@ -1,20 +1,24 @@
|
||||||
version: "3.7"
|
version: "2.4"
|
||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
image: babybuddy/babybuddy
|
image: babybuddy/babybuddy
|
||||||
|
container_name: babybuddyapp # Container_name is an optional value for single-container
|
||||||
|
# deployments to set a friendly container name.
|
||||||
|
# Disable in swarm or other multi-container setups.
|
||||||
# See README.md#configuration for other environment configuration options.
|
# See README.md#configuration for other environment configuration options.
|
||||||
environment:
|
environment:
|
||||||
- ALLOWED_HOSTS=
|
- ALLOWED_HOSTS=localhost # comma separated list of IP addresses or hosts that can access the web UI
|
||||||
- DJANGO_SETTINGS_MODULE=babybuddy.settings.base
|
- DJANGO_SETTINGS_MODULE=babybuddy.settings.base
|
||||||
- SECRET_KEY=
|
- SECRET_KEY= # Generate a random string here to secure the Django instance
|
||||||
- TIME_ZONE=
|
- TIME_ZONE= # In the tzdata format, IE, "America/Denver"
|
||||||
- DEBUG=False # Turn to False in production
|
- DEBUG=False # Turn to False in production
|
||||||
volumes:
|
volumes:
|
||||||
- data:/app/data:rw
|
- data:/app/data:rw
|
||||||
- media:/app/media:rw
|
- media:/app/media:rw
|
||||||
command: bash -c 'python manage.py migrate --noinput && python manage.py createcachetable && gunicorn babybuddy.wsgi -b :8000 --log-level=info'
|
command: bash -c 'python manage.py migrate --noinput && python manage.py createcachetable && gunicorn babybuddy.wsgi -b :8000 --log-level=info'
|
||||||
ports:
|
ports:
|
||||||
- "8000:8000"
|
- "8000:8000" # For Portainer, select another port for babybuddy such as 7000, for example "7000:8000"
|
||||||
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
data: {}
|
data: {}
|
||||||
media: {}
|
media: {}
|
||||||
|
|
|
@ -1,28 +1,36 @@
|
||||||
version: "3.7"
|
version: "2.4"
|
||||||
services:
|
services:
|
||||||
db:
|
db:
|
||||||
image: postgres:11 # pin postgres to a major version
|
image: postgres:11 # pin postgres to a major version
|
||||||
|
container_name: babybuddydb # Container_name is an optional value for single-container
|
||||||
|
# deployments to set a friendly container name.
|
||||||
|
# Disable in swarm or other multi-container setups.
|
||||||
environment:
|
environment:
|
||||||
- PGDATA=/db-data
|
- PGDATA=/db-data
|
||||||
- POSTGRES_PASSWORD=postgres # has to correspond with DB_PASSWORD in APP
|
- POSTGRES_PASSWORD=postgres # must correspond with DB_PASSWORD in APP
|
||||||
volumes:
|
volumes:
|
||||||
- db:/db-data:rw
|
- db:/db-data:rw
|
||||||
|
restart: unless-stopped
|
||||||
app:
|
app:
|
||||||
image: babybuddy/babybuddy
|
image: babybuddy/babybuddy
|
||||||
|
container_name: babybuddyapp # Container_name is an optional value for single-container
|
||||||
|
# deployments to set a friendly container name.
|
||||||
|
# Disable in swarm or other multi-container setups.
|
||||||
# See README.md#configuration for other environment configuration options.
|
# See README.md#configuration for other environment configuration options.
|
||||||
environment:
|
environment:
|
||||||
- ALLOWED_HOSTS=
|
- ALLOWED_HOSTS=localhost # comma separated list of IP addresses or hosts that can access the web UI
|
||||||
- DB_PASSWORD=postgres # has to correspond with POSTGRES_PASSWORD in DB
|
- DB_PASSWORD=postgres # must correspond with POSTGRES_PASSWORD in DB
|
||||||
- DJANGO_SETTINGS_MODULE=babybuddy.settings.docker
|
- DJANGO_SETTINGS_MODULE=babybuddy.settings.docker
|
||||||
- SECRET_KEY=
|
- SECRET_KEY= # Generate a random string here to secure the Django instance
|
||||||
- TIME_ZONE=
|
- TIME_ZONE= # In the tzdata format, IE, "America/Denver"
|
||||||
- DEBUG=False # Turn to False in production
|
- DEBUG=False # Turn to False in production
|
||||||
volumes:
|
volumes:
|
||||||
- media:/app/media:rw
|
- media:/app/media:rw
|
||||||
# Sleep 5 seconds to allow the db to to come up;
|
# Sleep 5 seconds to allow the db to to come up;
|
||||||
command: bash -c 'sleep 5 && python manage.py migrate --noinput && python manage.py createcachetable && gunicorn babybuddy.wsgi -b :8000 --log-level=info'
|
command: bash -c 'sleep 5 && python manage.py migrate --noinput && python manage.py createcachetable && gunicorn babybuddy.wsgi -b :8000 --log-level=info'
|
||||||
ports:
|
ports:
|
||||||
- "8000:8000"
|
- "8000:8000" # For Portainer, select another port for babybuddy such as 7000, for example "7000:8000"
|
||||||
|
restart: unless-stopped
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
volumes:
|
volumes:
|
||||||
|
|
Loading…
Reference in New Issue