forked from openstad/openstad-oauth2-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
114 lines (105 loc) · 3.07 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
#
# Docker Compose file for MijnOpenstad
#
# Extra notes:
# - You can run MijnOpenstad by running `docker-compose up -d`.
# This will create the MySQL Database and web server.
#
# Afterwards migrate the database by running the following commands:
# - `docker-compose exec web knex migrate:latest --env production`
# - `docker-compose exec web knex seed:run --env production`
#
---
version: '3'
services:
web:
image: ${REGISTRY:-127.0.0.1:5001}/${REPOSITORY:-opdrachten/openstad-auth}:${VERSION:-latest}
build:
context: .
environment:
ENVIRONMENT: "production"
SESSION_SECRET: "hfgy6734gtr4278ybu"
DB_HOST: "${DB_HOST:-mysql}"
DB_USER: "${DB_USER:-openstad}"
DB_PASSWORD: "${DB_PASSWORD:-openstad}"
DB_NAME: "${DB_NAME:-openstad}"
DB_PORT: 3306
MAIL_SERVER_URL: "smtp.gmail.com"
MAIL_SERVER_PORT: "465"
MAIL_SERVER_SECURE: "true"
MAIL_SERVER_PASSWORD: "${MAIL_PASSWORD:-openstad}"
MAIL_SERVER_USER_NAME: "${MAIL_USER:-openstad}"
MONGO_DB_HOST: "mongo"
MONGO_DB_PORT: 27017
# Set the client ID for admin panel (if generated with seeds, will be 1)
ADMIN_CLIENT_ID: 1
# Set the redirect URL (if generated with seeds, will be put in database)
ADMIN_REDIRECT_URL: "http://${DOMAIN:-localhost:}${PORT:-4000}/admin/"
# Set the APP url ()
APP_URL: "http://${DOMAIN:-localhost:}${PORT:-4000}/app/"
EMAIL_ASSETS_URL: "http://${DOMAIN:-localhost:}${PORT:-4000}/static/email/"
# Set the from name and email from which emails will be send (for example: password forgot & login url)
FROM_NAME: "Openstad"
FROM_EMAIL: "${FROM_EMAIL:-no-reply@localhost}"
ports:
- "${PORT:-2000:2000}"
- "${PORT:-4000:4000}"
restart: unless-stopped
networks:
- database
depends_on:
mysql:
condition: service_healthy
volumes:
- certs:/home/app/certs
- certs4:/home/app/certs4
mysql:
image: "mysql:5"
platform: linux/amd64
environment:
MYSQL_ROOT_PASSWORD: "${DB_PASSWORD:-openstad}"
MYSQL_DATABASE: "${DB_NAME:-openstad}"
MYSQL_USER: "${DB_USER:-openstad}"
MYSQL_PASSWORD: "${DB_PASSWORD:-openstad}"
expose:
- "3306"
- "33060"
ports:
- "3306:3306"
restart: unless-stopped
volumes:
- database:/var/lib/mysql
networks:
- database
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
timeout: 5s
retries: 20
mongo:
image: 'mongo:latest'
volumes:
- 'mongo:/data/db'
expose:
- "27017"
ports:
- '27017:27017'
restart: always
networks:
- database
#
# Volumes section
# Volumes:
# - database: A volume that contains everything that is stored in the MySQL database.
#
volumes:
database:
mongo:
certs:
certs4:
#
# Networks section
# Networks:
# - database, represents the isolated network between the server and the database.
networks:
database:
...