Fix docker cycle

This commit is contained in:
Oliver-Akins 2024-03-27 21:44:41 -06:00
parent eef14ad0ee
commit 933a022c4f
2 changed files with 12 additions and 8 deletions

View file

@ -23,4 +23,4 @@ cmd [ "/bin/bash" ]
from base as prod from base as prod
run npm install --omit=dev run npm install --omit=dev
run rm -rf src tsconfig.json run rm -rf src tsconfig.json
cmd [ "NODE_ENV=production", "node", "dist/main.js" ] cmd [ "node", "dist/main.js" ]

View file

@ -1,4 +1,3 @@
version: "3"
name: "tqna" name: "tqna"
services: services:
@ -6,7 +5,8 @@ services:
build: build:
context: "./api" context: "./api"
dockerfile: "dockerfile" dockerfile: "dockerfile"
target: dev target: prod
restart: "unless-stopped"
ports: ports:
- "6969:6969" - "6969:6969"
environment: environment:
@ -20,25 +20,29 @@ services:
- "./api:/app" - "./api:/app"
links: links:
- "db" - "db"
depends_on:
- "db"
stdin_open: true # stdin_open: true
tty: true # tty: true
site: site:
build: build:
context: "./frontend" context: "./frontend"
dockerfile: "dockerfile" dockerfile: "dockerfile"
target: "dev" target: "prod"
restart: "unless-stopped" restart: "unless-stopped"
ports: ports:
- "5173:5173" - "5173:5173"
- "8080:8080" - "8080:8080"
volumes: volumes:
- "./frontend:/app" - "./frontend:/app"
depends_on:
- "api"
stdin_open: true # stdin_open: true
tty: true # tty: true
db: db:
build: build: