diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b2f7170..9ca3d8b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,22 +40,6 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} registry: ghcr.io workdir: wikidata_service - docker-push-authservice: - name: Push auth service Docker Image to GitHub Packages - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - steps: - - uses: actions/checkout@v4 - - name: Publish to Registry - uses: elgohr/Publish-Docker-Github-Action@v5 - with: - name: arquisoft/wiq_en3a/authservice - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - registry: ghcr.io - workdir: users/authservice docker-push-userservice: name: Push user service Docker Image to GitHub Packages runs-on: ubuntu-latest @@ -71,7 +55,7 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} registry: ghcr.io - workdir: users/userservice + workdir: users docker-push-gatewayservice: name: Push gateway service Docker Image to GitHub Packages runs-on: ubuntu-latest @@ -91,7 +75,7 @@ jobs: deploy: name: Deploy over SSH runs-on: ubuntu-latest - needs: [docker-push-userservice,docker-push-authservice,docker-push-gatewayservice,docker-push-webapp, docker-push-wikidata-service] + needs: [docker-push-userservice,docker-push-gatewayservice,docker-push-webapp, docker-push-wikidata-service] steps: - name: Deploy over SSH uses: fifsky/ssh-action@master diff --git a/docker-compose.yml b/docker-compose.yml index b323060..7fa53d8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -21,29 +21,15 @@ services: networks: - mynetwork - authservice: - container_name: authservice-${teamname:-defaultASW} - image: ghcr.io/arquisoft/wiq_en3a/authservice:latest - profiles: ["dev", "prod"] - build: ./users/authservice - depends_on: - - mongodb - ports: - - "8002:8002" - networks: - - mynetwork - environment: - MONGODB_URI: mongodb://mongodb:27017/userdb - userservice: container_name: userservice-${teamname:-defaultASW} image: ghcr.io/arquisoft/wiq_en3a/userservice:latest profiles: ["dev", "prod"] - build: ./users/userservice + build: ./users depends_on: - mongodb ports: - - "8001:8001" + - "8002:8002" networks: - mynetwork environment: @@ -57,15 +43,13 @@ services: depends_on: - mongodb - userservice - - authservice - wikidata_service ports: - "8000:8000" networks: - mynetwork environment: - AUTH_SERVICE_URL: http://authservice:8002 - USER_SERVICE_URL: http://userservice:8001 + USER_SERVICE_URL: http://userservice:8002 WIKIDATA_SERVICE_URL: http://wikidata_service:7259 diff --git a/gatewayservice/gateway-service.js b/gatewayservice/gateway-service.js index 2a4bca8..5b01e3e 100644 --- a/gatewayservice/gateway-service.js +++ b/gatewayservice/gateway-service.js @@ -6,8 +6,7 @@ const promBundle = require('express-prom-bundle'); const app = express(); const port = 8000; -const authServiceUrl = process.env.AUTH_SERVICE_URL || 'http://localhost:8002'; -const userServiceUrl = process.env.USER_SERVICE_URL || 'http://localhost:8001'; +const userServiceUrl = process.env.USER_SERVICE_URL || 'http://localhost:8002'; const wikidataServiceUrl = process.env.WIKIDATA_SERVICE_URL || 'http://localhost:7259'; app.use(cors()); @@ -25,7 +24,7 @@ app.get('/health', (_req, res) => { app.post('/login', async (req, res) => { try { // Forward the login request to the authentication service - const authResponse = await axios.post(authServiceUrl + '/auth/login', req.body); + const authResponse = await axios.post(userServiceUrl + '/auth/login', req.body); res.json(authResponse.data); } catch (error) { res.status(error.response.status).json({ error: error.response.data.error }); diff --git a/users/index.js b/users/index.js index cc30a54..32776f4 100644 --- a/users/index.js +++ b/users/index.js @@ -32,8 +32,6 @@ app.use('/auth', authRoutes); app.use('/user', userRoutes); - - // Start the server const server = app.listen(port, () => { console.log(`Auth Service listening at http://localhost:${port}`);