This commit fixes the following error when running ./do setup to configure the dev env on a new Linux machine: ``` [ExecStack] Running pnpm install --frozen-lockfile --prefer-offline Internal Error: EACCES: permission denied, mkdir '/.cache' Error: EACCES: permission denied, mkdir '/.cache' ``` It sets the $XDG_DATA_HOME variable to /tmp/.cache in docker-compose.yml. This will affect other programs that rely on $XDG_DATA_HOME, but it is probably harmless. I was not able to find an env variable that is specific to PNPM, and that would affect only the location of its cache directory (https://pnpm.io/next/npmrc#cache-dir). [MAILPOET-5177]
113 lines
3.2 KiB
YAML
113 lines
3.2 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
dashboard:
|
|
container_name: mp-dashboard
|
|
image: nginx:1.21-alpine
|
|
ports:
|
|
- 8888:80
|
|
volumes:
|
|
- ./dev/dashboard:/usr/share/nginx/html:ro
|
|
|
|
db:
|
|
container_name: mp-db
|
|
image: mysql:5.7
|
|
volumes:
|
|
- my-datavolume:/var/lib/mysql
|
|
- ./dev/database/create_test_db.sh:/docker-entrypoint-initdb.d/10-create_test_db.sh
|
|
command: --sql_mode=STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION,ANSI,ONLY_FULL_GROUP_BY
|
|
environment:
|
|
MYSQL_ROOT_PASSWORD: somewordpress
|
|
MYSQL_DATABASE: wordpress
|
|
MYSQL_TEST_DATABASE: test_wordpress
|
|
MYSQL_USER: wordpress
|
|
MYSQL_PASSWORD: wordpress
|
|
|
|
wordpress:
|
|
container_name: mp-wp
|
|
build:
|
|
context: .
|
|
dockerfile: dev/php81/Dockerfile
|
|
args:
|
|
UID: ${UID:-1000}
|
|
GID: ${GID:-1000}
|
|
ports:
|
|
- '8002:80'
|
|
- '8083:8083' # Storybook port number, see package.json
|
|
depends_on:
|
|
- db
|
|
- smtp
|
|
user: ${UID:-1000}:${GID:-1000}
|
|
environment:
|
|
WORDPRESS_DEBUG: 1
|
|
WORDPRESS_DB_NAME: wordpress
|
|
WORDPRESS_DB_HOST: db:3306
|
|
WORDPRESS_DB_USER: wordpress
|
|
WORDPRESS_DB_PASSWORD: wordpress
|
|
PHP_IDE_CONFIG: 'serverName=Mailpoet'
|
|
COMPOSER_HOME: '/tmp/.composer'
|
|
NPM_CONFIG_CACHE: '/tmp/.npm'
|
|
XDG_CACHE_HOME: '/tmp/.cache'
|
|
MAILPOET_DEV_SITE: 1
|
|
volumes:
|
|
- './wordpress:/var/www/html'
|
|
- './tsconfig.base.json:/var/www/html/wp-content/plugins/tsconfig.base.json:ro'
|
|
- './package.json:/var/www/html/wp-content/plugins/package.json'
|
|
- './pnpm-lock.yaml:/var/www/html/wp-content/plugins/pnpm-lock.yaml'
|
|
- './pnpm-workspace.yaml:/var/www/html/wp-content/plugins/pnpm-workspace.yaml'
|
|
- './patches:/var/www/html/wp-content/plugins/patches'
|
|
- './mailpoet:/var/www/html/wp-content/plugins/mailpoet'
|
|
- './mailpoet-premium:/var/www/html/wp-content/plugins/mailpoet-premium'
|
|
- './packages:/var/www/html/wp-content/plugins/packages'
|
|
- './templates:/var/www/templates'
|
|
|
|
test_wordpress:
|
|
container_name: mp-test-wp
|
|
build:
|
|
context: .
|
|
dockerfile: dev/php81/Dockerfile
|
|
args:
|
|
UID: ${UID:-1000}
|
|
GID: ${GID:-1000}
|
|
ports:
|
|
- '8003:80'
|
|
depends_on:
|
|
- db
|
|
- smtp
|
|
user: ${UID:-1000}:${GID:-1000}
|
|
environment:
|
|
WORDPRESS_DB_NAME: test_wordpress
|
|
WORDPRESS_DB_HOST: db:3306
|
|
WORDPRESS_DB_USER: wordpress
|
|
WORDPRESS_DB_PASSWORD: wordpress
|
|
PHP_IDE_CONFIG: 'serverName=Mailpoet'
|
|
volumes:
|
|
- './mailpoet:/var/www/html/wp-content/plugins/mailpoet'
|
|
- './mailpoet-premium:/var/www/html/wp-content/plugins/mailpoet-premium'
|
|
- './packages:/var/www/html/wp-content/plugins/packages'
|
|
|
|
smtp:
|
|
container_name: mp-mailhog
|
|
image: mailhog/mailhog:v1.0.0
|
|
user: ${UID:-1000}:${GID:-1000}
|
|
environment:
|
|
MH_STORAGE: maildir
|
|
MH_MAILDIR_PATH: /output
|
|
volumes:
|
|
- './dev/data/mailhog:/output'
|
|
ports:
|
|
- '8082:8025'
|
|
|
|
adminer:
|
|
container_name: mp-adminer
|
|
image: adminer:latest
|
|
depends_on:
|
|
- db
|
|
ports:
|
|
- '8081:8080'
|
|
volumes:
|
|
- './dev/php.ini:/usr/local/etc/php/conf.d/custom.ini'
|
|
|
|
volumes:
|
|
my-datavolume:
|