Implemented basic architecture

+ User creation
+ Token auth
+ Login
This commit is contained in:
Unknown 2018-03-26 21:26:05 +02:00
parent 27489bb841
commit a70b0ed598
8 changed files with 145 additions and 0 deletions

4
.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
virtual/usr/local/tomcat/logs
virtual/usr/local/tomcat/webapps/ROOT/*
virtual/var/lib/mysql/*
virtual/var/log/nginx/*

75
docker-compose.yml Executable file
View File

@ -0,0 +1,75 @@
version: '3'
services:
mariadb:
image: mariadb:latest
container_name: mariadb
networks:
- overlay
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: douscord
MYSQL_USER: douscord
MYSQL_PASSWORD: AdriPossedeUnMicroPenis
volumes:
- ./virtual/var/lib/mysql:/var/lib/mysql
expose:
- '3306'
ports:
- 3308:3306
tomcat:
image: tomcat:8.0-jre8-alpine
container_name: tomcat
depends_on:
- mariadb
- websocket
networks:
- overlay
volumes:
- ./virtual/usr/local/tomcat/webapps:/usr/local/tomcat/webapps
- ./virtual/usr/local/tomcat/logs:/usr/local/tomcat/logs
expose:
- '8080'
links:
- mariadb
- websocket
websocket:
build:
context: .
dockerfile: ./dockfile/websocket.dockfile
container_name: websocket
depends_on:
- mariadb
networks:
- overlay
volumes:
- ./virtual/usr/local/websocket/:/usr/local/websocket
expose:
- '9999'
- '9998'
links:
- mariadb
nginx:
image: nginx:latest
container_name: nginx
depends_on:
- tomcat
- websocket
networks:
- overlay
volumes:
- ./virtual/etc/nginx/nginx.conf:/etc/nginx/nginx.conf
- ./virtual/var/log/nginx/:/var/log/nginx
- ./virtual/vhost:/vhost
ports:
- 4242:80
links:
- tomcat
- websocket
networks:
overlay:

View File

@ -0,0 +1,5 @@
FROM java:8-jdk-alpine
WORKDIR /usr/local/websocket
CMD ["java","-jar","./app.jar"]

View File

@ -0,0 +1,61 @@
user nginx;
worker_processes 5;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
worker_rlimit_nofile 8192;
events {
worker_connections 4096;
}
http {
include mime.types;
# include fastcgi.conf;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
tcp_nopush on;
server_names_hash_bucket_size 128;
keepalive_timeout 65;
gzip on;
# virtual host
server{
listen 80 default_server;
listen [::]:80 default_server;
root /vhost/public_html;
index index.html;
error_log /var/log/nginx/ptut.error.log;
access_log /var/log/nginx/ptut.access.log main;
location / {
proxy_pass http://tomcat:8080;
}
}
server{
listen 80;
listen [::]:80;
server_name ws.*;
location / {
proxy_pass http://websocket:9999;
}
}
}

Binary file not shown.

Binary file not shown.

View File

View File