Answer the question
In order to leave comments, you need to log in
How to use multiple docker containers?
My goal is to run a Vue + Laravel project on a server using docker. I'm trying to figure out how to connect Laravel and a database to a running Vue container.
I read a lot of articles, but in them Vue is not a CLI, but built into Laravel. I have Vue - a clean front, Laravel - a clean back. I've been scratching my head for a few days already..
Dockerfile
FROM node:lts-alpine
WORKDIR /app
COPY package*.json ./
RUN npm install
EXPOSE 8080
CMD ["npm", "run", "serve"]
version: '3'
services:
web:
build: .
stdin_open: true
tty: true
ports:
- "8080:8080"
volumes:
- "/app/node_modules"
- ".:/app"
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question