diff --git a/Dockerfile b/Dockerfile index 94fe059..8493e08 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,4 +17,4 @@ COPY . . EXPOSE 3000 # Command to run the application -CMD ["node", "index.js"] +CMD ["node", "src/index.js"] diff --git a/docker-compose.yml b/docker-compose.yml index 7d8d958..3d51cac 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,22 +1,6 @@ -version: '3.3' +version: "3.3" services: - db: - image: postgres:15 - environment: - POSTGRES_USER: postgres - POSTGRES_PASSWORD: postgres - POSTGRES_DB: node_api_db - ports: - - "5400:5432" - volumes: - - postgres-data:/var/lib/postgresql/data - healthcheck: - test: ["CMD-SHELL", "pg_isready -U postgres"] - interval: 10s - timeout: 5s - retries: 5 - node-api: build: context: . @@ -24,11 +8,11 @@ services: ports: - "3000:3000" environment: - - NODE_ENV=development - - DATABASE_URL=postgresql://postgres:postgres@db:5400/node_api_db - depends_on: - - db - + NODE_ENV: development + DATABASE_URL: postgresql://postgres:postgres@host.docker.internal:5450/node_api_db + extra_hosts: + - "host.docker.internal:host-gateway" + prometheus: image: prom/prometheus volumes: @@ -41,12 +25,10 @@ services: ports: - "3001:3000" environment: - - GF_SECURITY_ADMIN_USER=admin - - GF_SECURITY_ADMIN_PASSWORD=admin + GF_SECURITY_ADMIN_USER: admin + GF_SECURITY_ADMIN_PASSWORD: admin volumes: - grafana-storage:/var/lib/grafana volumes: grafana-storage: - postgres-data: -