mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-21 22:11:26 +00:00
Merge pull request #2588 from dunn/docker-compose-env
docker-compose: store default db passwords in .env.docker
This commit is contained in:
commit
56458c1f40
2 changed files with 20 additions and 18 deletions
13
.env.docker
13
.env.docker
|
@ -56,11 +56,16 @@ MAIL_ENCRYPTION=null
|
|||
|
||||
## Databases (MySQL)
|
||||
DB_CONNECTION=mysql
|
||||
DB_HOST=127.0.0.1
|
||||
DB_DATABASE=pixelfed_prod
|
||||
DB_HOST=db
|
||||
DB_PASSWORD=pixelfed_db_pass
|
||||
DB_PORT=3306
|
||||
DB_DATABASE=pixelfed
|
||||
DB_USERNAME=pixelfed
|
||||
DB_PASSWORD=pixelfed
|
||||
# pass the same values to the db itself
|
||||
MYSQL_DATABASE=pixelfed_prod
|
||||
MYSQL_PASSWORD=pixelfed_db_pass
|
||||
MYSQL_RANDOM_ROOT_PASSWORD=true
|
||||
MYSQL_USER=pixelfed
|
||||
|
||||
## Databases (Postgres)
|
||||
#DB_CONNECTION=pgsql
|
||||
|
@ -74,7 +79,7 @@ DB_PASSWORD=pixelfed
|
|||
REDIS_CLIENT=phpredis
|
||||
REDIS_SCHEME=tcp
|
||||
REDIS_HOST=redis
|
||||
REDIS_PASSWORD=null
|
||||
REDIS_PASSWORD=redis_password
|
||||
REDIS_PORT=6379
|
||||
REDIS_DATABASE=0
|
||||
|
||||
|
|
|
@ -11,7 +11,6 @@ version: '3'
|
|||
# if the volumes are properly shared between cluster members.
|
||||
|
||||
services:
|
||||
|
||||
## App and Worker
|
||||
app:
|
||||
# Comment to use dockerhub image
|
||||
|
@ -21,16 +20,15 @@ services:
|
|||
image: pixelfed
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- ./.env.docker
|
||||
- .env.docker
|
||||
volumes:
|
||||
- "app-storage:/var/www/storage"
|
||||
- "app-bootstrap:/var/www/bootstrap"
|
||||
- "./.env.docker:/var/www/.env"
|
||||
- app-storage:/var/www/storage
|
||||
- app-bootstrap:/var/www/bootstrap
|
||||
networks:
|
||||
- external
|
||||
- internal
|
||||
ports:
|
||||
- "8080:80"
|
||||
- "8080:80"
|
||||
depends_on:
|
||||
- db
|
||||
- redis
|
||||
|
@ -42,10 +40,10 @@ services:
|
|||
image: pixelfed
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- ./.env.docker
|
||||
- .env.docker
|
||||
volumes:
|
||||
- "app-storage:/var/www/storage"
|
||||
- "app-bootstrap:/var/www/bootstrap"
|
||||
- app-storage:/var/www/storage
|
||||
- app-bootstrap:/var/www/bootstrap
|
||||
networks:
|
||||
- external
|
||||
- internal
|
||||
|
@ -61,17 +59,16 @@ services:
|
|||
networks:
|
||||
- internal
|
||||
command: --default-authentication-plugin=mysql_native_password
|
||||
environment:
|
||||
- MYSQL_DATABASE=pixelfed
|
||||
- MYSQL_USER=${DB_USERNAME}
|
||||
- MYSQL_PASSWORD=${DB_PASSWORD}
|
||||
- MYSQL_RANDOM_ROOT_PASSWORD=true
|
||||
env_file:
|
||||
- .env.docker
|
||||
volumes:
|
||||
- "db-data:/var/lib/mysql"
|
||||
|
||||
redis:
|
||||
image: redis:5-alpine
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- .env.docker
|
||||
volumes:
|
||||
- "redis-data:/data"
|
||||
networks:
|
||||
|
|
Loading…
Reference in a new issue