Add initial production
This commit is contained in:
41
docker-compose.yml
Normal file
41
docker-compose.yml
Normal file
@@ -0,0 +1,41 @@
|
||||
version: '3'
|
||||
|
||||
networks:
|
||||
main:
|
||||
external: true
|
||||
|
||||
services:
|
||||
backend:
|
||||
image: node:lts-bookworm
|
||||
container_name: backend
|
||||
restart: unless-stopped
|
||||
env_file: ./backend/.env.production
|
||||
networks:
|
||||
- main
|
||||
ports:
|
||||
- '18055:8055'
|
||||
volumes:
|
||||
- ./backend:/app
|
||||
- ./data:/data
|
||||
labels:
|
||||
caddy: admin.pca-pijac.dev.civokram.com
|
||||
caddy.reverse_proxy: '{{upstreams 18055}}'
|
||||
command: sh -c "npm i -g pnpm && cd /app && pnpm install --production && pnpm run start"
|
||||
|
||||
frontend:
|
||||
image: node:lts-bookworm
|
||||
container_name: frontend
|
||||
restart: unless-stopped
|
||||
env_file: ./frontend/.env.production
|
||||
depends_on:
|
||||
- backend
|
||||
networks:
|
||||
- main
|
||||
ports:
|
||||
- '13000:3000'
|
||||
volumes:
|
||||
- ./frontend:/app
|
||||
labels:
|
||||
caddy: pca-pijac.dev.civokram.com
|
||||
caddy.reverse_proxy: '{{upstreams 13000}}'
|
||||
command: sh -c "npm i -g pnpm && cd /app && pnpm install --production && sleep 10 && pnpm run build && pnpm run start"
|
||||
Reference in New Issue
Block a user