working on docker images

This commit is contained in:
subnub
2020-05-17 23:26:10 -04:00
parent d379e9aa24
commit eabed0cc0b
6 changed files with 32 additions and 7 deletions
+2 -1
View File
@@ -17,4 +17,5 @@ package-lock.json
._*
.DS_Store
dist/
rds-combined-ca-bundle.pem
rds-combined-ca-bundle.pem
docker-variables.env
+1 -1
View File
@@ -1,4 +1,4 @@
FROM node
FROM node:13
WORKDIR /usr/app
+3 -4
View File
@@ -36,15 +36,14 @@ const getWebUIKey = () => {
})
const port = process.env.HTTP_PORT || process.env.PORT || "3000";
const url = "localhost";
const url = process.env.DOCKER ? undefined : "localhost";
const server = http.createServer(app) as any;
server.listen(port, url, () => {
const fullURL = `http://localhost:${port!}`;
console.log("\nPlease Navigate To", fullURL, "To Enter Encryption Password\n")
console.log(`\nPlease navigate to http://localhost:${port} to enter encryption key\n`)
});
})
+24
View File
@@ -0,0 +1,24 @@
version: '3'
services:
app:
container_name: mydrive-node
restart: always
build: .
ports:
- '3000:3000'
- '8080:8080'
env_file:
- docker-variables.env
links:
- mongo
mongo:
container_name: mongo
image: mongo
ports:
- '27017:27017'
volumes:
- 'mongodb_data_volume:/data/db'
volumes:
mongodb_data_volume:
external: true
-1
View File
@@ -43,7 +43,6 @@ export const startCreateAccount = (email, password) => {
return (dispatch) => {
const dt = {email, password};
axios.post(currentURL+"/user-service/create", dt).then((response) => {
+2
View File
@@ -14,6 +14,7 @@ const path = require("path");
module.exports = (env) => {
//console.log("env docker", process.env.DOCKER);
if (env === "test") {
@@ -29,6 +30,7 @@ module.exports = (env) => {
console.log("Loading production env variables")
require("dotenv").config({path: ".env.production"});
require("dotenv").config({path: "docker-variables.env"});
}
console.log("env", env);