Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- version: '3'
- services:
- web:
- build: ./web
- restart: always
- volumes:
- - ./html/:/var/www/html/
- links:
- - mysql
- expose:
- - "8000"
- ports:
- - "8000:8000"
- privileged: true
- mysql:
- image: mysql:8.0
- ports:
- - "3306:3306"
- environment:
- MYSQL_ROOT_PASSWORD: root
- MYSQL_USER: test
- MYSQL_PASSWORD: test_pass
- MYSQL_DATABASE: django
- volumes:
- - ./storage:/var/lib/mysql
- FROM centos:centos7
- RUN yum -y update &&
- yum install -y https://centos7.iuscommunity.org/ius-release.rpm &&
- yum install -y vim python36u python36u-libs python36u-devel python36u-pip httpd httpd-devel gcc &&
- yum clean all &&
- rm -rf /usr/bin/python &&
- ln -s /usr/bin/python3.6 /usr/bin/python &&
- ln -s /usr/bin/pip3.6 /bin/pip &&
- pip install --upgrade pip
- COPY ./requirements.txt /var/www/html/requirements.txt
- COPY ./django.conf /etc/httpd/conf.d/django.conf
- WORKDIR /var/www/html
- RUN pip install -r requirements.txt
- ENTRYPOINT ["/usr/sbin/httpd", "-D", "FOREGROUND"]
- version: '3'
- services:
- os:
- image: centos:centos7
- restart: always
- depends_on:
- - web
- web:
- image: centos/nginx-18-centos7
- restart: always
- ports:
- - "8082:80"
- depends_on:
- - db
- - app
- app:
- build: centos/python-36-centos7
- restart: always
- db:
- image: mysql:8.0
- restart: always
- ports:
- - "3306:3306"
- environment:
- MYSQL_ROOT_PASSWORD: root
- MYSQL_USER: test
- MYSQL_PASSWORD: test_pass
- MYSQL_DATABASE: django
- volumes:
- - ./storage:/var/lib/mysql
Add Comment
Please, Sign In to add comment