Skip to content

Commit

Permalink
[TM-1312] Clean up user service image build.
Browse files Browse the repository at this point in the history
  • Loading branch information
roguenet committed Oct 15, 2024
1 parent 3269c7d commit ff65128
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 41 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,12 @@ jobs:
- name: Build, tag, and push images to Amazon ECR
id: build-images
run: |
: # Don't build the base image with NODE_ENV because it'll limit the packages that are installed
docker build -t terramatch-microservices-base:nx-base .
docker build --build-arg NODE_ENV=${{ env.NODE_ENV }} -f apps/user-service/Dockerfile -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
echo "image=$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" >> $GITHUB_OUTPUT
echo "image=$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG"
: # Each service we add will get a separate build line here
USER_SERVICE_IMAGE = $ECR_REGISTRY/$ECR_REPOSITORY:user-service$IMAGE_TAG
docker build --build-arg NODE_ENV=${{ env.NODE_ENV }} -f apps/user-service/Dockerfile -t $USER_SERVICE_IMAGE .
docker push $USER_SERVICE_IMAGE
echo "image=$USER_SERVICE_IMAGE" >> $GITHUB_OUTPUT
echo "image=$USER_SERVICE_IMAGE"
15 changes: 0 additions & 15 deletions docker-compose.test.yml

This file was deleted.

33 changes: 11 additions & 22 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,15 @@
version: "3.8"

networks:
corp:
driver: bridge

version: "3"
services:
user-service:
container_name: user-service
mariadb:
build:
context: ./
cache_from:
- terramatch-microservices-base:nx-base
dockerfile: ./apps/user-service/Dockerfile
args:
NODE_ENV: "production"
BUILD_FLAG: ""
image: user-service:nx-prod
context: "."
dockerfile: "docker/mariadb.Dockerfile"
ports:
- 4010:4010
environment:
NODE_ENV: "production"
PORT: 4010
- "3360:3306"
networks:
- corp
restart: on-failure
- "default"
environment:
MYSQL_ROOT_PASSWORD: "root"
MYSQL_DATABASE: "terramatch_microservices_test"
MYSQL_USER: "wri"
MYSQL_PASSWORD: "wri"

0 comments on commit ff65128

Please sign in to comment.