🚦 Added traefik
This commit is contained in:
@@ -8,6 +8,10 @@ services:
|
|||||||
image: frishi/threetwo
|
image: frishi/threetwo
|
||||||
container_name: threetwo-ui
|
container_name: threetwo-ui
|
||||||
env_file: ./docker-compose.env
|
env_file: ./docker-compose.env
|
||||||
|
restart: unless-stopped
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=true"
|
||||||
|
- "traefik.http.routers.threetwo-ui.rule=Host(`threetwo.local`)"
|
||||||
ports:
|
ports:
|
||||||
- "8050:8050"
|
- "8050:8050"
|
||||||
- "3050:3050"
|
- "3050:3050"
|
||||||
@@ -15,7 +19,7 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- rabbitmq
|
- rabbitmq
|
||||||
- db
|
- db
|
||||||
- nginx
|
- traefik
|
||||||
- importapi
|
- importapi
|
||||||
- import
|
- import
|
||||||
- imagetransformation
|
- imagetransformation
|
||||||
@@ -126,15 +130,31 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
- proxy
|
- proxy
|
||||||
|
|
||||||
nginx:
|
|
||||||
image: nginx
|
traefik:
|
||||||
container_name: reverse-proxy
|
image: traefik:2.3.4
|
||||||
|
restart: unless-stopped
|
||||||
|
container_name: traefik
|
||||||
|
hostname: traefik
|
||||||
|
command:
|
||||||
|
- "--log.level=DEBUG"
|
||||||
|
- "--api.insecure=true"
|
||||||
|
- "--providers.docker=true"
|
||||||
|
- "--providers.docker.watch=true"
|
||||||
|
- "--providers.docker.exposedbydefault=false"
|
||||||
|
- "--entrypoints.web.address=:80"
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=true"
|
||||||
|
- "traefik.http.routers.traefik.rule=Host(`traefik.localhost`)"
|
||||||
|
- "traefik.http.routers.traefik.service=api@internal"
|
||||||
|
networks:
|
||||||
|
- proxy
|
||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- 80:80
|
||||||
|
- 8080:8080
|
||||||
|
- 443:443
|
||||||
volumes:
|
volumes:
|
||||||
- type: bind
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
source: ./proxy.conf
|
|
||||||
target: /etc/nginx/conf.d/default.conf
|
|
||||||
|
|
||||||
rabbitmq:
|
rabbitmq:
|
||||||
image: 'bitnami/rabbitmq:latest'
|
image: 'bitnami/rabbitmq:latest'
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ export const io = new Server(httpServer, {
|
|||||||
cors: {
|
cors: {
|
||||||
origin: "*",
|
origin: "*",
|
||||||
methods: ["GET", "POST"],
|
methods: ["GET", "POST"],
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
// configure app to use bodyParser for
|
// configure app to use bodyParser for
|
||||||
@@ -26,7 +26,7 @@ app.use(bodyParser.urlencoded({ extended: true }));
|
|||||||
const port: number = Number(process.env.PORT) || 8050; // set our port
|
const port: number = Number(process.env.PORT) || 8050; // set our port
|
||||||
// set rabbitMQ host
|
// set rabbitMQ host
|
||||||
|
|
||||||
const rabbitMQConnectionString = process.env.RABBITMQ_URI || "amqp://localhost";
|
const rabbitMQConnectionString = process.env.RABBITMQ_URI || "amqp://localhost:5672";
|
||||||
|
|
||||||
// Send index.html on root request
|
// Send index.html on root request
|
||||||
app.use(express.static("dist"));
|
app.use(express.static("dist"));
|
||||||
|
|||||||
Reference in New Issue
Block a user