Fixed docker config and backend setup

master
franciszek 4 years ago
parent 525660221b
commit 5110955b22

@ -1,16 +1,11 @@
version: "3.2" version: "3.7"
services: services:
db: db:
image: mongo:4.4-bionic image: mongo:4.4-bionic
ports: ports:
- "127.0.0.1:20723:27017" - "127.0.0.1:20724:27017"
test: mailcatcher:
image: sealious-test:latest image: schickling/mailcatcher:latest
build:
context: .
dockerfile: test.Dockerfile
volumes:
- ./:/opt/app/
ports: ports:
- "127.0.0.1:8080:8080" - "127.0.0.1:1080:1080"
user: ${UID:-1000}:${GID:-1000} - "127.0.0.1:1025:1025"

@ -5,7 +5,7 @@ import Static from "koa-static";
import Router from "@koa/router"; import Router from "@koa/router";
import mount from "koa-mount"; import mount from "koa-mount";
const locreq = _locreq(__dirname); const locreq = _locreq(__dirname);
import Sealious, { App, Collection, FieldTypes, Policies } from "sealious"; import Sealious, { App } from "sealious";
declare module "koa" { declare module "koa" {
interface BaseContext { interface BaseContext {
@ -19,20 +19,21 @@ const app = new (class extends App {
upload_path: locreq.resolve("uploaded_files"), upload_path: locreq.resolve("uploaded_files"),
datastore_mongo: { datastore_mongo: {
host: "localhost", host: "localhost",
port: 20723, port: 20724,
db_name: "sealious-playground", db_name: "cloud-dashboard",
}, },
email: { email: {
from_address: "zglszanskoweb@example.com", from_address: "sealious-playground@example.com",
from_name: "Zgłaszańsko web", from_name: "Sealious playground app",
}, },
}; };
manifest = { manifest = {
name: "Zgłaszańsko web", name: "Sealious Playground",
logo: resolve(__dirname, "../assets/logo.png"), logo: resolve(__dirname, "../assets/logo.png"),
version: "0.0.1", version: "0.0.1",
default_language: "pl", default_language: "en",
base_url: "localhost:8080", base_url: "http://localhost:8080",
admin_email: "admin@example.com", admin_email: "admin@example.com",
colors: { colors: {
primary: "#5294a1", primary: "#5294a1",
@ -43,8 +44,8 @@ const app = new (class extends App {
}; };
})(); })();
app.HTTPServer.addStaticRoute("/", locreq.resolve("public")); const port = 3000;
const port = 8080;
console.log(`Listening on 127.0.0.1:${port}`); console.log(`Listening on 127.0.0.1:${port}`);
app.start(); app.start();
app.HTTPServer.addStaticRoute("/", locreq.resolve("public"));

Loading…
Cancel
Save