docker beginnings

This commit is contained in:
Tomáš Mládek 2019-12-17 13:00:15 +01:00
parent 39cbfb851a
commit 902a49dcb2
7 changed files with 40 additions and 0 deletions

View file

@ -0,0 +1,9 @@
FROM python:3.7
RUN apt-get update && apt-get -y install ffmpeg
COPY ./src /app
RUN cd /app && pip install -r requirements.txt
CMD /app/run.sh

24
docker/docker-compose.yml Normal file
View file

@ -0,0 +1,24 @@
version: '3'
#volumes:
# postgres_ksx-radio: {}
services:
# ksx-postgres:
# restart: always
# image: postgres:11
# ports:
# - "5532:5432"
# volumes:
# - postgres_ksx-radio:/var/lib/postgresql/data
# - ../src/db_versions:/docker-entrypoint-initdb.d
# environment:
# - POSTGRES_USER=ksx
# - POSTGRES_PASSWORD=ksx
# - POSTGRES_DB=ksx-radio
delojza:
restart: always
build:
context: ../.
dockerfile: ./docker/delojza/Dockerfile

7
src/run.sh Executable file
View file

@ -0,0 +1,7 @@
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd ${DIR}
trap "kill 0" EXIT
source ./.venv/bin/activate
python delojza.py 2>&1 |tee -a delojza_redirect.log