initial-commit
This commit is contained in:
63
docker-compose.yml
Normal file
63
docker-compose.yml
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
services:
|
||||||
|
takerofnotes:
|
||||||
|
container_name: takerofnotes
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile.prod
|
||||||
|
image: takerofnotes-cms:latest
|
||||||
|
restart: unless-stopped
|
||||||
|
env_file: .env
|
||||||
|
environment:
|
||||||
|
DATABASE_CLIENT: ${DATABASE_CLIENT}
|
||||||
|
DATABASE_HOST: takerofnotesDB
|
||||||
|
DATABASE_NAME: ${DATABASE_NAME}
|
||||||
|
DATABASE_USERNAME: ${DATABASE_USERNAME}
|
||||||
|
DATABASE_PORT: ${DATABASE_PORT}
|
||||||
|
JWT_SECRET: ${JWT_SECRET}
|
||||||
|
ADMIN_JWT_SECRET: ${ADMIN_JWT_SECRET}
|
||||||
|
DATABASE_PASSWORD: ${DATABASE_PASSWORD}
|
||||||
|
NODE_ENV: ${NODE_ENV}
|
||||||
|
volumes:
|
||||||
|
- ./.env:/opt/app/.env
|
||||||
|
- ./public/uploads:/opt/app/public/uploads
|
||||||
|
depends_on:
|
||||||
|
- takerofnotesDB
|
||||||
|
healthcheck:
|
||||||
|
test:
|
||||||
|
- CMD
|
||||||
|
- node
|
||||||
|
- "-e"
|
||||||
|
- "fetch('http://127.0.0.1:1337/admin').then((r) => {if (r.status !== 200) throw new Error(r.status)})"
|
||||||
|
timeout: 5s
|
||||||
|
interval: 5s
|
||||||
|
retries: 3
|
||||||
|
|
||||||
|
takerofnotesDB:
|
||||||
|
container_name: takerofnotesDB
|
||||||
|
platform: linux/amd64
|
||||||
|
restart: unless-stopped
|
||||||
|
env_file: .env
|
||||||
|
image: postgres:14.5-alpine
|
||||||
|
environment:
|
||||||
|
POSTGRES_USER: ${DATABASE_USERNAME}
|
||||||
|
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
|
||||||
|
POSTGRES_DB: ${DATABASE_NAME}
|
||||||
|
volumes:
|
||||||
|
- takerofnotes-data:/var/lib/postgresql/data/
|
||||||
|
|
||||||
|
takerofnotesAdminer:
|
||||||
|
container_name: takerofnotesAdminer
|
||||||
|
image: adminer
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
- ADMINER_DEFAULT_SERVER=takerofnotesDB
|
||||||
|
depends_on:
|
||||||
|
- takerofnotesDB
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
takerofnotes-data:
|
||||||
|
|
||||||
|
networks:
|
||||||
|
takerofnotes:
|
||||||
|
name: takerofnotes
|
||||||
|
driver: bridge
|
||||||
Reference in New Issue
Block a user