Skip to content
Snippets Groups Projects
Commit d7bae715 authored by David Schmitz's avatar David Schmitz
Browse files

feature/split_celery: made docker-compose.yml downward-compatible for docker-compose v1

parent 09dbe3b6
No related branches found
No related tags found
No related merge requests found
......@@ -6,8 +6,7 @@ services:
command: /opt/FOD/pythonenv ./manage.py runserver 0.0.0.0:8000
container_name: fod
depends_on:
celery:
condition: service_healthy
- celery
privileged: true
expose:
......@@ -28,10 +27,10 @@ services:
context: .
dockerfile: docker-compose/Dockerfile_FOD
image: flowspydjango
command: sh -c '/opt/setup_environment.sh && while ! mysqladmin -h db ping; do echo "DB not yet ready, waiting 1 sec"; sleep 1; done && echo "database is ready" && /opt/FOD/pythonenv ./manage.py migrate && exec supervisord -c docker-compose/fod_celery_supervisord.conf'
container_name: celeryfod
depends_on:
db:
condition: service_healthy
- db
privileged: true
env_file:
- ./docker-compose/.env_fod
......@@ -46,7 +45,7 @@ services:
interval: 30s
timeout: 20s
retries: 3
start_period: 30s
#start_period: 30s
redis:
image: redis:latest
......
......@@ -16,6 +16,6 @@ FOD_REDIS_HOST=redis
FOD_DB_ENG=mysql
FOD_DB_NAME=fod
FOD_DB_USER=root
FOD_DB_PASS=''
FOD_DB_PASS=
FOD_DB_HOST=db
FOD_DB_PORT=''
FOD_DB_PORT=
......@@ -8,6 +8,8 @@ RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
ENV LANG en_US.UTF-8
RUN apt-get update -y && apt-get -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold' --assume-yes -fuy dist-upgrade
RUN apt-get install -y git less man make gcc strace ltrace lsof file vim tshark tcpdump curl wget net-tools sudo psutils procps iptables iputils-ping iputils-tracepath hping3 iproute2 supervisor
# currently needed to check health of db container:
RUN apt-get install -y mariadb-client
#RUN useradd exabgp
RUN mkdir -p /var/run/supervisor /opt/FOD
WORKDIR /opt/FOD
......
......@@ -73,7 +73,7 @@ DATABASES = {
'USER': '', # DB_USER
'PASSWORD': '', # DB_PASSWORD
'HOST': os.getenv('FOD_DB_HOST', ''), # Set to empty string for localhost.
'PORT': os.getenv('FOD_DB_PORT', ''), # Set to empty string for default.
'PORT': os.getenv('FOD_DB_PORT', '3306'), # Set to empty string for default. | now set to 3306 for mysql/mariadb default
}
}
......
......@@ -408,7 +408,8 @@ while [ $# -gt 0 ]; do
conf_db_access="' + os.getenv('FOD_DB_ENG', 'mysql') + '"
DB__FOD_DBNAME="_require_env('FOD_DB_NAME')"
DB__FOD_USER="_require_env('FOD_DB_USER')"
DB__FOD_PASSWORD="_require_env('FOD_DB_PASS')"
#DB__FOD_PASSWORD="_require_env('FOD_DB_PASS')"
DB__FOD_PASSWORD="os.getenv('FOD_DB_PASS', '')"
elif [ $# -ge 1 -a "$1" = "--setup_admin_user" ]; then
shift 1
setup_adminuser=1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment