Closed Tofdu31 closed 6 years ago
Hello @Tofdu31
Thanks for the feedback.
I always rather work with the official images, but you could add this to the files.
I tried to add the lines but it does not work. I have an error:
ERROR: yaml.scanner.ScannerError: while scanning a simple key
in "./docker-compose.yml", line 30, column 8
could not find expected ':'
in "./docker-compose.yml", line 31, column 8
This is my docker-compose.yml
version: '3'
services:
db:
container_name: ${CONTAINER_DB_NAME}
image: mariadb:latest
restart: unless-stopped
volumes:
- ${DB_PATH}:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
wordpress:
depends_on:
- db
container_name: ${CONTAINER_WP_NAME}
image: wordpress:latest
restart: unless-stopped
volumes:
- ${WP_CORE}:/var/www/html
- ${WP_CONTENT}:/var/www/html/wp-content
- ./conf.d/uploadsize.ini:/usr/local/etc/php/conf.d/uploadsize.ini
environment:
WORDPRESS_DB_HOST: ${CONTAINER_DB_NAME}:3306
WORDPRESS_DB_NAME: ${MYSQL_DATABASE}
WORDPRESS_DB_USER: ${MYSQL_USER}
WORDPRESS_DB_PASSWORD: ${MYSQL_PASSWORD}
WORDPRESS_TABLE_PREFIX: ${WORDPRESS_TABLE_PREFIX}
WORDPRESS_USERNAME= ${WORDPRESS_USERNAME}
WORDPRESS_PASSWORD= ${WORDPRESS_PASSWORD}
WORDPRESS_EMAIL= ${WORDPRESS_EMAIL}
WORDPRESS_FIRST_NAME= ${WORDPRESS_FIRST_NAME}
WORDPRESS_LAST_NAME= ${WORDPRESS_LAST_NAME}
WORDPRESS_BLOG_NAME= ${WORDPRESS_BLOG_NAME}
ALLOW_EMPTY_PASSWORD= ${ALLOW_EMPTY_PASSWORD}
SMTP_HOST= ${SMTP_HOST}
SMTP_PORT= ${SMTP_PORT}
SMTP_USER= ${SMTP_USER}
SMTP_PASSWORD= ${SMTP_PASSWORD}
SMTP_PROTOCOL= ${SMTP_PROTOCOL}
VIRTUAL_HOST: ${DOMAINS}
LETSENCRYPT_HOST: ${DOMAINS}
LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL}
logging:
options:
max-size: ${LOGGING_OPTIONS_MAX_SIZE:-200k}
# wpcli:
# image: tatemz/wp-cli
# volumes:
# - ${WP_CORE}:/var/www/html
# - ${WP_CONTENT}:/var/www/html/wp-content
# depends_on:
# - db
# entrypoint: wp
networks:
default:
external:
name: ${NETWORK}
Just update using : istead of =. Read your file carefully and check the details, but will work:
From:
WORDPRESS_USERNAME= ${WORDPRESS_USERNAME}
WORDPRESS_PASSWORD= ${WORDPRESS_PASSWORD}
WORDPRESS_EMAIL= ${WORDPRESS_EMAIL}
WORDPRESS_FIRST_NAME= ${WORDPRESS_FIRST_NAME}
WORDPRESS_LAST_NAME= ${WORDPRESS_LAST_NAME}
WORDPRESS_BLOG_NAME= ${WORDPRESS_BLOG_NAME}
ALLOW_EMPTY_PASSWORD= ${ALLOW_EMPTY_PASSWORD}
SMTP_HOST= ${SMTP_HOST}
SMTP_PORT= ${SMTP_PORT}
SMTP_USER= ${SMTP_USER}
SMTP_PASSWORD= ${SMTP_PASSWORD}
SMTP_PROTOCOL= ${SMTP_PROTOCOL}
To:
WORDPRESS_USERNAME**:** ${WORDPRESS_USERNAME}
WORDPRESS_PASSWORD: ${WORDPRESS_PASSWORD}
WORDPRESS_EMAIL: ${WORDPRESS_EMAIL}
etc...
arfff, but of course! So, I'm going to bed!
Hello Evert and nice job one more time!
Would it be possible to find a solution to add environment variables like bitnami images such as:
User and Site configuration
SMTP Configuration
This would be an example of User and Site and SMTP configuration using a GMail account:
Docker-compose.yml :
.env :
This is an idea that I hope will not give too much work :)
Thank