Skip to content
This repository was archived by the owner on Feb 11, 2022. It is now read-only.

Commit 1ebc047

Browse files
committed
Split up docker-compose, add .gitignore, update packages and fix shell scripts
1 parent b496b1f commit 1ebc047

10 files changed

Lines changed: 465 additions & 71 deletions

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
/js-backend/keys/server_cert.pem
22
/js-backend/keys/server_key.pem
33
node_modules
4-
dist
4+
dist
5+
/cache/certbot/*
6+
!/cache/certbot/.gitkeep
7+
/cache/database/*
8+
!/cache/database/.gitkeep

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ You will need to restart the command line in such case
3838

3939
### Docker Container
4040

41-
You can use the `docker-compose.yml` file to start a production-ready environment via `docker-compose up --build`.
41+
You can use the `docker-compose.yml` file to start a production-ready environment via `docker-compose up -f docker-compose.yml -f docker-compose.test.yml --build`.
4242

4343
In the future, all components will be available to be directly pulled from the registry.
4444

docker-compose.test.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
version: '3.7'
2+
3+
services:
4+
database:
5+
image: mysql:5
6+
volumes:
7+
- ./owasp_sso.sql:/docker-entrypoint-initdb.d/setup.sql
8+
- ./cache/database:/var/lib/mysql
9+
restart: always
10+
environment:
11+
MYSQL_ROOT_PASSWORD: insecure-default-root-password
12+
MYSQL_DATABASE: owasp_sso
13+
MYSQL_USER: owasp_sso
14+
MYSQL_PASSWORD: insecure-default-password
15+
16+
database-admin:
17+
image: adminer
18+
restart: always
19+
ports:
20+
- 8008:8080
21+
22+
smtp:
23+
image: mailhog/mailhog
24+
restart: always
25+

docker-compose.yml

Lines changed: 22 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,8 @@
11
version: '3.7'
22

33
services:
4-
database:
5-
image: mysql:5
6-
volumes:
7-
- ./owasp_sso.sql:/docker-entrypoint-initdb.d/setup.sql
8-
- ./cache/database:/var/lib/mysql
9-
restart: always
10-
environment:
11-
MYSQL_ROOT_PASSWORD: insecure-default-root-password
12-
MYSQL_DATABASE: owasp_sso
13-
MYSQL_USER: owasp_sso
14-
MYSQL_PASSWORD: insecure-default-password
15-
16-
# If you want to take a look at the database for debugging
17-
#database-admin:
18-
# image: adminer
19-
# restart: always
20-
# ports:
21-
# - 8008:8080
22-
23-
smtp:
24-
image: mailhog/mailhog
25-
restart: always
26-
274
backend:
285
restart: always
29-
depends_on:
30-
- smtp
31-
- database
326
build:
337
context: .
348
dockerfile: backend.dockerfile
@@ -37,11 +11,31 @@ services:
3711
environment:
3812
- DOMAIN
3913
- FRONTENDPORT=443
14+
- DBHOST
15+
- DBUSER
16+
- DBDATABASE
17+
- DBPASS
18+
- SMTPHOST
19+
- SMTPPORT
20+
- SMTPSECURE
21+
- SMTPUSER
22+
- SMTPPASS
23+
- ISSUERNAME
24+
- FIDO2FACTOR
25+
- FIDO2TIMEOUT
26+
- DISABLELOCALHOSTPATCHING
27+
- PWNEDPASSFAILSAFE
28+
- PWHISTORY
29+
- ARGON2TYPE
30+
- ARGON2PARALLEL
31+
- ARGON2TIME
32+
- ARGON2MEMORY
33+
- AUDITPAGELENGTH
34+
- FALLBACKEMAILFROM
4035

41-
# Nginx fails if backend is not available
4236
frontend:
4337
depends_on:
44-
- backend
38+
- backend # Nginx fails if backend is not available
4539
restart: always
4640
build:
4741
context: .

0 commit comments

Comments
 (0)