Szakdolgozat/docker-compose.yml
NorbiPeti aa6f3f51de
Fix backend production deploy and database connection
- Fixed database URL locally and in production
- Set separate DB user just to be safe
- Migrate DB schema on each launch
- Use node user during dev but use root during deploy
- Fix output of the dev container (tsc-watch --noClear)
2021-11-15 22:47:41 +01:00

33 lines
714 B
YAML

services:
frontend:
build: frontend
ports:
- "80:4200"
volumes:
- ./frontend:/home/node/app
environment:
- COMMAND=run
backend:
build: backend
ports:
- "8019:3000"
volumes:
- ./backend:/home/node/app
environment:
- COMMAND=run
- DATABASE_URL=mysql://szakdolgozat:DevelopmentPassword@database/szakdolgozat
user: ${USERNAME:-node}
database:
image: mysql:5.6
ports:
- "3306:3306"
environment:
- MYSQL_ROOT_PASSWORD=VerySecretPassword
- MYSQL_DATABASE=szakdolgozat
- MYSQL_USER=szakdolgozat
- MYSQL_PASSWORD=DevelopmentPassword
networks:
default:
name: szakdolgozat
driver: bridge