compose and nginx

This commit is contained in:
ntr committed 2022-08-30 19:25:36 +10:00
1 parent 44c83d3b33
commit 2804477601
7 files changed
+123 -43

No files matched your search

+30 -25
View File
@@ -12,32 +12,37 @@ services:
volumes:
- "./db:/var/lib/postgresql/data"
pg-test:
image: postgres:latest
environment:
POSTGRES_USER: 'mcrates'
POSTGRES_DB: 'test'
POSTGRES_PASSWORD: 'digdeep'
ports:
- '55432:5432'
# api:
# image: node:16
# working_dir: /opt/mcrates/api
# entrypoint: npm start
# pg-test:
# image: postgres:latest
# environment:
# DATABASE_URL: 'postgresql://mcrates:digdeep@pg:5432/mcrates?schema=public'
# POSTGRES_USER: 'mcrates'
# POSTGRES_DB: 'test'# POSTGRES_PASSWORD: 'digdeep'
# ports:
# - '41337:41337'
# volumes:
# - "./api:/opt/mcrates/api"
# - '55432:5432'
# client:
# image: node:16
# working_dir: /opt/mcrates/client
# entrypoint: npm start
# ports:
# - '8080:8080'
# volumes:
# - "./client:/opt/mcrates/client"
api:
image: node:16
working_dir: /opt/mcrates/api
entrypoint: npm start
environment:
DATABASE_URL: 'postgresql://mcrates:digdeep@pg:5432/mcrates?schema=public'
ports:
- '41337:41337'
volumes:
- "./api:/opt/mcrates/api"
client:
image: node:16
working_dir: /opt/mcrates/client
entrypoint: npm start
ports:
- '8080:8080'
volumes:
- "./client:/opt/mcrates/client"
nginx:
image: nginx:latest
volumes:
- './nginx/localhost.nginx.conf:/etc/nginx/conf.d/default.conf'
ports:
- '80:80'