mirror of
https://github.com/wallabag/docker.git
synced 2026-02-27 04:07:36 +01:00
Test docker secrets
This commit is contained in:
1
.github/workflows/test.yml
vendored
1
.github/workflows/test.yml
vendored
@ -21,6 +21,7 @@ jobs:
|
|||||||
- "sqlite"
|
- "sqlite"
|
||||||
- "mariadb"
|
- "mariadb"
|
||||||
- "postgresql"
|
- "postgresql"
|
||||||
|
- "postgresql-secret"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: "Checkout"
|
- name: "Checkout"
|
||||||
|
|||||||
1
tests/credentials/db_password
Normal file
1
tests/credentials/db_password
Normal file
@ -0,0 +1 @@
|
|||||||
|
wallapass
|
||||||
1
tests/credentials/env_secret
Normal file
1
tests/credentials/env_secret
Normal file
@ -0,0 +1 @@
|
|||||||
|
F00B4R
|
||||||
1
tests/credentials/postgres_password
Normal file
1
tests/credentials/postgres_password
Normal file
@ -0,0 +1 @@
|
|||||||
|
my-secret-pw
|
||||||
31
tests/docker-compose.postgresql-secret.yml
Normal file
31
tests/docker-compose.postgresql-secret.yml
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
version: '2'
|
||||||
|
services:
|
||||||
|
wallabag:
|
||||||
|
build:
|
||||||
|
context: ../
|
||||||
|
image: wallabag:postgresql
|
||||||
|
container_name: wallabag
|
||||||
|
environment:
|
||||||
|
- POSTGRES_PASSWORD__FILE=/run/secrets/postgres_password
|
||||||
|
- POSTGRES_USER=my-super-user
|
||||||
|
- SYMFONY__ENV__SECRET__FILE=/run/secrets/env_secret
|
||||||
|
- SYMFONY__ENV__DATABASE_DRIVER=pdo_pgsql
|
||||||
|
- SYMFONY__ENV__DATABASE_HOST=db
|
||||||
|
- SYMFONY__ENV__DATABASE_PORT=5432
|
||||||
|
- SYMFONY__ENV__DATABASE_NAME=wallabag
|
||||||
|
- SYMFONY__ENV__DATABASE_USER=wallabag
|
||||||
|
- SYMFONY__ENV__DATABASE_PASSWORD__FILE=/run/secrets/db_password
|
||||||
|
ports:
|
||||||
|
- "127.0.0.1:80:80"
|
||||||
|
# Docker Secrets require Swarm Mode, so we use volumes instead to spoof the behaviour
|
||||||
|
volumes:
|
||||||
|
- ./credentials/db_password:/run/secrets/db_password
|
||||||
|
- ./credentials/postgres_password:/run/secrets/postgres_password
|
||||||
|
- ./credentials/env_secret:/run/secrets/env_secret
|
||||||
|
db:
|
||||||
|
image: postgres:10.3
|
||||||
|
environment:
|
||||||
|
- POSTGRES_PASSWORD_FILE=/run/secrets/postgres_password
|
||||||
|
- POSTGRES_USER=my-super-user
|
||||||
|
volumes:
|
||||||
|
- ./credentials/postgres_password:/run/secrets/postgres_password
|
||||||
Reference in New Issue
Block a user