diff --git a/docker/prod/docker-compose.yml b/docker/prod/docker-compose.yml index cef9602..2af0450 100644 --- a/docker/prod/docker-compose.yml +++ b/docker/prod/docker-compose.yml @@ -5,3 +5,4 @@ services: - '8081:8081' environment: - NODE_ENV=production + env_file: ../../.env.production diff --git a/package.json b/package.json index 6e39e44..6057014 100644 --- a/package.json +++ b/package.json @@ -19,10 +19,11 @@ "docker:dev:down": "docker compose --env-file .env.development -f ./docker/dev/docker-compose.yml down", "docker:dev:destroy": "./docker/dev/docker-destroy.sh", "docker:dev:run-in-container": "docker compose --env-file .env.development -f ./docker/dev/docker-compose.yml exec app", - "docker:prod:build": "docker build . -t letehaha/budget-tracker-be -f ./docker/prod/Dockerfile", - "docker:prod:preview": "docker compose --env-file .env.development -f ./docker/prod/docker-compose.yml up -d", + "docker:prod:build": "docker buildx build --platform linux/amd64 -t letehaha/budget-tracker-be:latest -f ./docker/prod/Dockerfile .", "docker:prod:push": "docker push letehaha/budget-tracker-be", - "docker:prod:build-push": "npm run docker-build && npm run docker-push", + "docker:prod:preview": "docker compose -f ./docker/prod/docker-compose.yml up", + "docker:prod:preview:down": "docker compose -f ./docker/prod/docker-compose.yml down", + "docker:prod:build-push": "npm run docker:prod:build && npm run docker:prod:push", "postinstall": "chmod +x ./post-install.sh && ./post-install.sh", "prepare": "node -e \"if (process.env.NODE_ENV !== 'production'){process.exit(1)} \" || husky install" },