All containers that are exposed via proxy are now on their own correct networks and depend on traefik

This commit is contained in:
Luke Else 2022-10-31 21:39:29 +00:00
parent b9b9380606
commit cfe86a01a2
7 changed files with 105 additions and 48 deletions

View File

@ -8,4 +8,12 @@ services:
container_name: vaultwarden
volumes:
- ./bitwarden/:/data/
networks:
- bitwarden
depends_on:
- traefik
restart: unless-stopped
networks:
bitwarden:
external: true

View File

@ -6,33 +6,48 @@ services:
mongodb:
image: "mongo:latest"
container_name: mongoDB
volumes:
- ./mongo/:/data/db
networks:
- backend
ports:
- "27017:27017"
depends_on:
- traefik
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: rootpassword
ports:
- "27017:27017"
volumes:
- ./mongo/:/data/db
restart: unless-stopped
#MySQL (3306) + phpMyAdmin ()
mysql:
image: "mysql"
container_name: MySQL
volumes:
- ./mysql/:/var/lib/mysql
networks:
- backend
ports:
- "3306:3306"
depends_on:
- traefik
environment:
MYSQL_ROOT_PASSWORD: rootpassword
MYSQL_DATABASE: test_db
ports:
- "3306:3306"
volumes:
- ./mysql/:/var/lib/mysql
restart: unless-stopped
phpMyAdmin:
image: "phpmyadmin/phpmyadmin:latest"
container_name: phpMyAdmin
networks:
- backend
depends_on:
- mysql
- traefik
environment:
PMA_HOST: mysql
restart: unless-stopped
depends_on:
- mysql
networks:
backend:
external: true

View File

@ -6,6 +6,16 @@ services:
gitea:
image: gitea/gitea:latest
container_name: gitea
volumes:
- ./gitea:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
networks:
- development
ports:
- "222:22"
depends_on:
- traefik
environment:
- APP_NAME="gitea"
- USER_UID=1000
@ -19,10 +29,8 @@ services:
- SSH_PORT=222
- SSH_LISTEN_PORT=22
- DB_TYPE=sqlite3
ports:
- "222:22"
volumes:
- ./gitea:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
restart: unless-stopped
networks:
development:
external: true

View File

@ -4,39 +4,40 @@ services:
#Jira
Jira:
depends_on:
- 'postgresql'
image: atlassian/jira-software:latest
container_name: Jira
volumes:
- ./jira:/var/atlassian/jira
networks:
- jira
- development
ports:
- '8080:8080'
depends_on:
- postgresql
- traefik
environment:
VIRTUAL_HOST: localhost
CATALINA_OPTS: '-Xms1024m -Xmx2048m -XX:+UseG1GC -Datlassian.plugins.enable.wait=300'
X_PROXY_NAME: jira.luke-else.co.uk
X_PROXY_PORT: 443
X_PROXY_SCHEME: https
networks:
- Jira
- Development
ports:
- '8080:8080'
volumes:
- ./jira:/var/atlassian/jira
restart: unless-stopped
#Postgres database
postgresql:
image: sameersbn/postgresql:latest
container_name: postgresql
volumes:
- ./postgresql:/var/lib/postgresql
networks:
- jira
environment:
- DEBUG=false
- DB_USER=jira
- DB_PASS=password
- DB_NAME=jiradb
- DB_EXTENSION=pg_trgm
volumes:
- ./postgresql:/var/lib/postgresql
networks:
- jira
restart: unless-stopped
volumes:
@ -47,4 +48,6 @@ volumes:
networks:
jira:
driver: bridge
name: jira
development:
external: true

View File

@ -1,29 +1,44 @@
version: '3.8'
services:
db:
image: mariadb
container_name: nextclouddb
restart: always
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
volumes:
- ./db:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=
- MYSQL_PASSWORD=
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
nextcloud:
image: nextcloud
container_name: nextcloud
restart: always
links:
- db
volumes:
- ./nextcloud:/var/www/html
networks:
- services
- nextcloud
depends_on:
- traefik
- db
environment:
- MYSQL_PASSWORD=
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
- MYSQL_HOST=db
restart: unless-stopped
db:
image: mariadb
container_name: nextclouddb
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
volumes:
- ./db:/var/lib/mysql
networks:
- nextcloud
environment:
- MYSQL_ROOT_PASSWORD=
- MYSQL_PASSWORD=
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
restart: unless-stopped
networks:
services:
external: true
nextcloud:
name: nextcloud

View File

@ -31,9 +31,9 @@ networks:
name: frontend
gitea:
name: development
databases:
backend:
name: backend
bitwarden:
name: bitwarden
nextcloud:
services:
name: services

View File

@ -8,6 +8,8 @@ services:
container_name: luke-else.co.uk
volumes:
- ./luke-else.co.uk/:/var/www/html
depends_on:
- traefik
restart: unless-stopped
snexo.co.uk:
@ -15,4 +17,10 @@ services:
container_name: snexo.co.uk
volumes:
- ./snexo.co.uk/:/var/www/html
depends_on:
- traefik
restart: unless-stopped
networks:
frontend:
external: true