last day (15 days later) » 

10:13 AM
docker-compose.yml:

version: '3'
services:

app:
build:
context: ./app
dockerfile: Dockerfile
image: f1-site/udp-app
container_name: app
restart: unless-stopped
tty: true
volumes:
- ./app:/var/app
ports:
- "8080:8080"
networks:
- default-network

#Docker Networks
networks:
default-network:
driver: bridge
Dockerfile:

FROM node:12

# Create app directory
WORKDIR /usr/app

# Install app dependencies
COPY package.json .
RUN npm install

# Bundle app source
COPY . .

# Bind app to port 8080
EXPOSE 8080

RUN tsc -p ./server/tsconfig.json

# Run the app
CMD ["node", "./dist/index.js"]
 
 
5 hours later…
Max
2:55 PM
could you please send me your package.json?
 
Hi Max!
In the meantime, I figured it out
Your answer helped me, but I included an npm package with an individual typescript / npm run build in it
but that build directory was not pushed on github
I forked this repo from someone and made some changed, so that's why I had to include it with the github url (instead of simply the npm name)
so this package never built
in my fork, I took the build directory out of the .gitignore, I built it and then pushed it to my fork
And now it works fine!
So, thank you for your answer, it did help! :)
The only thing different was that I needed to say:
RUN /usr/src/server/node_modules/typescript/bin/tsc -p /usr/src/server/server/tsconfig.json
instead of:
RUN tcs
 
Max
Ah ok I see, making custom changes in npm modules without forking it is making us mad :D I would suggest that you fixing your used docker image from node to lts or a specic number in common. i used to use the alpine version but in later stages i alwys using the lts tag from docker:node
 
ah yes
but, thank you for your help/effort/tmie!
 
Max
your welcome, therefore is stackoverflow
 
have a nice day!
 
Max
3:08 PM
an upvote will be realy nice :) have a nice day too
 
ah yes! I will do that right now
 

last day (15 days later) »