Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

notes #3

Open
frank-dspeed opened this issue Mar 6, 2019 · 0 comments
Open

notes #3

frank-dspeed opened this issue Mar 6, 2019 · 0 comments

Comments

@frank-dspeed
Copy link
Member

compose.yml

version: "3"
services:
  service:
    restart: always
    hostname: 'dev'
    container_name: 'dev'
    image: typo3
    build: 
      context: .
    #ports:
      #- "80"
    volumes:
      - ./html:/var/www/html
      - ./hjtml/fileadmin:/var/www/html/fileadmin
      - ./html/typo3conf:/var/www/html/typo3conf
      - ./html/uploads:/var/www/html/uploads
    networks:
      - nginx
  mysql:
    image: mysql:5.7
    volumes:
      - ./mysql:/var/lib/mysql
    command:
      - --character-set-server=utf8
      - --collation-server=utf8_unicode_ci
    environment:
      - "MYSQL_USER=${MYSQL_USER:-typo3}"
      - "MYSQL_PASSWORD=${MYSQL_PASSWORD:-password}"
      - "MYSQL_DATABASE=${MYSQL_DATABASE:-typo3}"
      - "MYSQL_RANDOM_ROOT_PASSWORD=yes"
    networks:
      - nginx

networks:
  nginx:
    external:
      name: nginx_docker-network

dockerfile

# Install TYPO3
FROM dockerimages/typo3-baseimage:php7.0-apache
WORKDIR /var/www/html
ADD ./install_typo3 /
# Configure volumes
VOLUME /var/www/html
CMD ["/install_typo3"]
#VOLUME /var/www/html/fileadmin
#VOLUME /var/www/html/typo3conf
#VOLUME /var/www/html/typo3temp
#VOLUME /var/www/html/uploads

Run.sh

#!/bin/bash
if [ ! -f /var/www/html/FIRST_INSTALL ]; then
    cd /var/www/html
    echo "File not found!"
    wget -O - https://get.typo3.org/7.6 | tar -xzf - && \
    ln -s typo3_src-* typo3_src && \
    ln -s typo3_src/index.php && \
    ln -s typo3_src/typo3 && \
    ln -s typo3_src/_.htaccess .htaccess && \
    mkdir typo3temp && \
    mkdir typo3conf && \
    mkdir fileadmin && \
    mkdir uploads && \
    touch FIRST_INSTALL
fi
chown -R www-data. .
apache2-foreground
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant