Files
cbsnexora-backend/docker-compose.yml
T
Michael Vorburger 70ac0819b5 Add Z,ro flags to Docker Compose Volume
This is required on secure Linux distributions such as
Fedora/CentOS/RHEL where SELinux is enabled, where without this
the mysql container fails to start due to:

  ls: cannot open directory '/docker-entrypoint-initdb.d/': Permission denied

These Z,ro volume mount flags are (should be..) harmless and ignored
by Docker on other platforms, such as insecure ;) Linux distributions
without SELinux, or Windows and Mac.

PS: I personally don't actually use real Docker, but instead I use Podman
(see https://github.com/containers/libpod; install via `dnf install podman-docker`)
and https://github.com/containers/podman-compose/) via `pip3 install podman-compose`;
it's more secure (because it doesn't need a daemon and root to run containers).
2019-10-12 00:40:04 +02:00

38 lines
1.1 KiB
YAML

# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
version: '3.7'
services:
fineractmysql:
image: mysql:5.7
volumes:
- ./fineract-db/docker:/docker-entrypoint-initdb.d:Z,ro
restart: always
environment:
MYSQL_ROOT_PASSWORD: mysql
ports:
- "3306:3306"
fineract-server:
build:
context: .
target: fineract
ports:
- 8443:8443
depends_on:
- fineractmysql