Last active
May 4, 2022 16:58
-
-
Save jcroot/af624947a05ff4f8ae696e9145e70a9f to your computer and use it in GitHub Desktop.
Zend Docker Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
remolques.test: | |
build: . | |
image: remolques/app | |
volumes: | |
- ".:/var/www/html" | |
ports: | |
- "80:80" | |
depends_on: | |
- mysql-db | |
mysql-db: | |
platform: linux/x86_64 | |
image: "mysql:8.0" | |
command: mysqld --default_authentication_plugin=mysql_native_password | |
ports: | |
- "3306:3306" | |
environment: | |
MYSQL_ROOT_PASSWORD: password | |
MYSQL_DATABASE: database | |
MYSQL_USER: userdb | |
MYSQL_PASSWORD: password | |
MYSQL_ALLOW_EMPTY_PASSWORD: "yes" | |
volumes: | |
- zendmysql:/var/lib/mysql | |
mailhog: | |
image: 'mailhog/mailhog:latest' | |
ports: | |
- 1025:1025 | |
- 8025:8025 | |
networks: | |
- default | |
networks: | |
default: | |
driver: bridge | |
volumes: | |
zendmysql: | |
driver: local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM php:7.1-apache | |
RUN apt-get update \ | |
&& apt-get install -y git zlib1g-dev wget tar \ | |
&& docker-php-ext-install mysqli pdo pdo_mysql gettext zip \ | |
&& a2enmod rewrite \ | |
&& sed -i 's!/var/www/html!/var/www/html/public!g' /etc/apache2/sites-available/000-default.conf \ | |
&& sed -i 's!www.example.com!remolques.localhost!g' /etc/apache2/sites-available/000-default.conf \ | |
&& curl -sS https://getcomposer.org/installer \ | |
| php -- --install-dir=/usr/local/bin --filename=composer | |
WORKDIR /var/www/html | |
RUN wget https://packages.zendframework.com/releases/ZendFramework-1.12.20/ZendFramework-1.12.20-minimal.tar.gz | |
RUN gunzip ZendFramework-1.12.20-minimal.tar.gz && \ | |
tar -xf ZendFramework-1.12.20-minimal.tar && \ | |
rm ZendFramework-1.12.20-minimal.tar | |
RUN cp -R ZendFramework-1.12.20-minimal/library/Zend/ ./library/ | |
RUN mkdir -p data/logs | |
RUN chmod 777 data/logs/ | |
RUN rm -rf ZendFramework-1.12.20-minimal/ | |
COPY application ./application | |
COPY library ./library | |
COPY public ./public | |
#coment | |
EXPOSE 8000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
postgres: | |
image: 'postgres:latest' | |
ports: | |
- '${FORWARD_DB_PORT:-5432}:5432' | |
environment: | |
POSTGRES_DB: '${DB_DATABASE}' | |
POSTGRES_USER: '${DB_USERNAME}' | |
POSTGRES_PASSWORD: '${DB_PASSWORD}' | |
volumes: | |
- 'sailpostgres:/var/lib/postgresql/data' | |
networks: | |
- sail |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment