add SuperTokens to docker Compose file
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
services:
|
services:
|
||||||
|
#============== API Hub ====================================================================
|
||||||
api:
|
api:
|
||||||
build: ./backend/
|
build: ./backend/
|
||||||
container_name: MIH-API-Hub
|
container_name: MIH-API-Hub
|
||||||
@@ -7,35 +8,66 @@ services:
|
|||||||
- 8080:8080
|
- 8080:8080
|
||||||
volumes:
|
volumes:
|
||||||
- .:/app
|
- .:/app
|
||||||
|
networks:
|
||||||
|
- MIH-network
|
||||||
depends_on:
|
depends_on:
|
||||||
- mysqldb
|
- mysqldb
|
||||||
|
#============== My SQL DB ====================================================================
|
||||||
mysqldb:
|
mysqldb:
|
||||||
#build: ./database/
|
#build: ./database/
|
||||||
image: mysql
|
image: mysql:5.7
|
||||||
container_name: MIH-Database
|
container_name: MIH-Database
|
||||||
restart: always
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
MYSQL_DATABASE: 'testdb'
|
|
||||||
MYSQL_ROOT_PASSWORD: 'C@rtoon1995'
|
MYSQL_ROOT_PASSWORD: 'C@rtoon1995'
|
||||||
|
MYSQL_USER: 'yaso'
|
||||||
|
MYSQL_PASSWORD: 'C@rtoon1995'
|
||||||
|
MYSQL_DATABASE: 'supertokens'
|
||||||
|
networks:
|
||||||
|
- MIH-network
|
||||||
ports:
|
ports:
|
||||||
- '3306:3306'
|
- '3306:3306'
|
||||||
volumes:
|
volumes:
|
||||||
- ./database:/var/lib/mysql
|
- ./database:/var/lib/mysql
|
||||||
|
#============== Super Token Auth ====================================================================
|
||||||
|
supertokens:
|
||||||
|
container_name: MIH-SuperTokens
|
||||||
|
image: registry.supertokens.io/supertokens/supertokens-mysql
|
||||||
|
depends_on:
|
||||||
|
- mysqldb
|
||||||
|
ports:
|
||||||
|
- 3567:3567
|
||||||
|
environment:
|
||||||
|
MYSQL_USER: 'yaso'
|
||||||
|
MYSQL_PASSWORD: 'C@rtoon1995'
|
||||||
|
MYSQL_HOST: mysqldb
|
||||||
|
MYSQL_PORT: 3306
|
||||||
|
MYSQL_DATABASE_NAME: supertokens
|
||||||
|
networks:
|
||||||
|
- MIH-network
|
||||||
|
restart: unless-stopped
|
||||||
|
healthcheck:
|
||||||
|
test: >
|
||||||
|
bash -c 'exec 3<>/dev/tcp/127.0.0.1/3567 && echo -e "GET /hello HTTP/1.1\r\nhost: 127.0.0.1:3567\r\nConnection: close\r\n\r\n" >&3 && cat <&3 | grep "Hello"'
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
#============== PHP My Admin ====================================================================
|
||||||
phpmyadmin:
|
phpmyadmin:
|
||||||
image: phpmyadmin/phpmyadmin
|
image: phpmyadmin/phpmyadmin
|
||||||
container_name: MIH-phpmyadmin
|
container_name: MIH-phpmyadmin
|
||||||
environment:
|
environment:
|
||||||
PMA_HOST: mysqlDB
|
PMA_HOST: mysqlDB
|
||||||
PMA_PORT: 3306
|
PMA_PORT: 3306
|
||||||
PMA_ARBITRARY: 1
|
PMA_ARBITRARY:
|
||||||
|
networks:
|
||||||
|
- MIH-network
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- 8081:80
|
- 8081:80
|
||||||
depends_on:
|
depends_on:
|
||||||
- mysqldb
|
- mysqldb
|
||||||
|
#============== Nginx Proxy Server ====================================================================
|
||||||
nginx:
|
nginx:
|
||||||
container_name: nginx
|
container_name: nginx
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
@@ -49,17 +81,21 @@ services:
|
|||||||
- certbotChall:/var/www/certbot
|
- certbotChall:/var/www/certbot
|
||||||
depends_on:
|
depends_on:
|
||||||
- user-interface
|
- user-interface
|
||||||
|
networks:
|
||||||
|
- MIH-network
|
||||||
profiles: ['prod']
|
profiles: ['prod']
|
||||||
|
#============== Flutter App ====================================================================
|
||||||
user-interface:
|
user-interface:
|
||||||
container_name: MIH-UX
|
container_name: MIH-UX
|
||||||
build:
|
build:
|
||||||
context: ./Frontend/patient_manager
|
context: ./Frontend/patient_manager
|
||||||
ports:
|
ports:
|
||||||
- "83:83"
|
- "83:83"
|
||||||
|
networks:
|
||||||
|
- MIH-network
|
||||||
depends_on:
|
depends_on:
|
||||||
- api
|
- api
|
||||||
|
#============== Cert Not ====================================================================
|
||||||
certbot:
|
certbot:
|
||||||
image: certbot/certbot
|
image: certbot/certbot
|
||||||
container_name: certbot
|
container_name: certbot
|
||||||
@@ -68,10 +104,12 @@ services:
|
|||||||
- certbotChall:/var/www/certbot
|
- certbotChall:/var/www/certbot
|
||||||
#command: certonly --test-cert --webroot -w /var/www/certbot --force-renewal --email yasienmeth@gmail.com -d mzansi-innovation-hub.co.za -d www.mzansi-innovation-hub.co.za --agree-tos
|
#command: certonly --test-cert --webroot -w /var/www/certbot --force-renewal --email yasienmeth@gmail.com -d mzansi-innovation-hub.co.za -d www.mzansi-innovation-hub.co.za --agree-tos
|
||||||
command: certonly --webroot -w /var/www/certbot --force-renewal --email yasienmeth@gmail.com -d mzansi-innovation-hub.co.za -d www.mzansi-innovation-hub.co.za --agree-tos
|
command: certonly --webroot -w /var/www/certbot --force-renewal --email yasienmeth@gmail.com -d mzansi-innovation-hub.co.za -d www.mzansi-innovation-hub.co.za --agree-tos
|
||||||
|
networks:
|
||||||
|
- MIH-network
|
||||||
depends_on:
|
depends_on:
|
||||||
- nginx
|
- nginx
|
||||||
profiles: ['withCert']
|
profiles: ['withCert']
|
||||||
|
#============== Minio File Storage ====================================================================
|
||||||
minio:
|
minio:
|
||||||
container_name: MIH-Minio
|
container_name: MIH-Minio
|
||||||
hostname: minio
|
hostname: minio
|
||||||
@@ -84,7 +122,15 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- MINIO_ROOT_USER=yaso
|
- MINIO_ROOT_USER=yaso
|
||||||
- MINIO_ROOT_PASSWORD=C@rtoon1995
|
- MINIO_ROOT_PASSWORD=C@rtoon1995
|
||||||
|
networks:
|
||||||
|
- MIH-network
|
||||||
|
#============== Named Volumes ====================================================================
|
||||||
volumes:
|
volumes:
|
||||||
certbotConf:
|
certbotConf:
|
||||||
certbotChall:
|
certbotChall:
|
||||||
|
#============== MIH Network ====================================================================
|
||||||
|
networks:
|
||||||
|
MIH-network:
|
||||||
|
driver: bridge
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user