Skip to content

Commit

Permalink
Merge pull request #2 from Arquisoft/dev_composeimprovement
Browse files Browse the repository at this point in the history
Minor improvements into the compose deployment
  • Loading branch information
labra authored Jan 22, 2024
2 parents 4e46a61 + cacb599 commit 9bc62ff
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 127 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
teamname="asw2324_0"
teamname="wiq_0"
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,4 +125,4 @@ jobs:
wget https://raw.githubusercontent.com/arquisoft/wiq_0/master/docker-compose.yml
wget https://raw.githubusercontent.com/arquisoft/wiq_0/master/docker-compose-deploy.override.yml
docker compose down
docker compose -f docker-compose.yml -f docker-compose-deploy.override.yml up -d
docker compose --profile prod up -d
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ git clone https://github.com/Arquisoft/wiq_0.git
and launch it with docker compose:

```sh
docker compose -f docker-compose.yml -f docker-compose-dev.override.yml up --build
docker compose --profile dev up --build
```

### Starting Component by component
Expand Down Expand Up @@ -102,7 +102,7 @@ deploy:
command: |
wget https://raw.githubusercontent.com/arquisoft/wiq_0/master/docker-compose-deploy.yml -O docker-compose.yml
docker compose down --volumes
docker compose -f docker-compose.yml -f docker-compose-deploy.override.yml up -d
docker compose --profile prod up -d
```
This action uses three secrets that must be configured in the repository:
Expand Down
41 changes: 0 additions & 41 deletions docker-compose-deploy.override.yml

This file was deleted.

81 changes: 0 additions & 81 deletions docker-compose-dev.override.yml

This file was deleted.

72 changes: 71 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,108 @@ services:
mongodb:
container_name: mongodb-${teamname:-defaultASW}
image: mongo
profiles: ["dev", "prod"]
volumes:
- mongodb_data:/data/db
ports:
- "27017:27017"
networks:
- mynetwork

authservice:
container_name: authservice-${teamname:-defaultASW}
image: ghcr.io/arquisoft/wiq_0/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_0/userservice:latest
profiles: ["dev", "prod"]
build: ./users/userservice
depends_on:
- mongodb
ports:
- "8001:8001"
networks:
- mynetwork
environment:
MONGODB_URI: mongodb://mongodb:27017/userdb

gatewayservice:
container_name: gatewayservice-${teamname:-defaultASW}
image: ghcr.io/arquisoft/wiq_0/gatewayservice:latest
profiles: ["dev", "prod"]
build: ./gatewayservice
depends_on:
- mongodb
- userservice
- authservice
ports:
- "8000:8000"
networks:
- mynetwork
environment:
AUTH_SERVICE_URL: http://authservice:8002
USER_SERVICE_URL: http://userservice:8001

webapp:
container_name: webapp-${teamname:-defaultASW}
image: ghcr.io/arquisoft/wiq_0/webapp:latest
profiles: ["dev", "prod"]
build: ./webapp
depends_on:
- gatewayservice
- gatewayservice
ports:
- "3000:3000"

prometheus:
image: prom/prometheus
container_name: prometheus-${teamname:-defaultASW}
profiles: ["dev"]
networks:
- mynetwork
volumes:
- ./gatewayservice/monitoring/prometheus:/etc/prometheus
- prometheus_data:/prometheus
ports:
- "9090:9090"
depends_on:
- gatewayservice

grafana:
image: grafana/grafana
container_name: grafana-${teamname:-defaultASW}
profiles: ["dev"]
networks:
- mynetwork
volumes:
- grafana_data:/var/lib/grafana
- ./gatewayservice/monitoring/grafana/provisioning:/etc/grafana/provisioning
environment:
- GF_SERVER_HTTP_PORT=9091
- GF_AUTH_DISABLE_LOGIN_FORM=true
- GF_AUTH_ANONYMOUS_ENABLED=true
- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
ports:
- "9091:9091"
depends_on:
- prometheus


volumes:
mongodb_data:
prometheus_data:
grafana_data:

networks:
mynetwork:
driver: bridge

0 comments on commit 9bc62ff

Please sign in to comment.