docker-compose.yml
version: '2'
services:
chrome-flow:
image: selenium/standalone-chrome:latest
container_name: py_pachon_chrome
shm_size: 2g
restart: always
py_pachon:
build:
context: .
dockerfile: ./Dockerfile
image: py_app:3
container_name: py_pachon
environment:
dblink: /code/dblink-prod.properties
access_token: 68518eaa2d7012fc0bf9e0bb0eea9466090c7ef5547423f0ef4c537ea77b376e
flag: True
restart: always
Dockerfile
FROM python:3.7
ADD / /code
WORKDIR /code
RUN pip3 install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/ \
&& /bin/cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone
CMD ["python3", "/code/job.py"]