Skip to content

Commit de0ced4

Browse files
committed
Push Post To DockerHub
1 parent a021c5f commit de0ced4

File tree

24 files changed

+543
-249
lines changed

24 files changed

+543
-249
lines changed

.idea/compiler.xml

Lines changed: 178 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build-image.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,23 @@ build_push_java() {
2020
--push .
2121
}
2222

23+
24+
build_push_file_service() {
25+
docker buildx build \
26+
-f docker/file-service.Dockerfile \
27+
-t "$DOCKERHUB_USER/codecampus-file-service:$IMAGE_TAG" \
28+
--push .
29+
}
30+
2331
main() {
2432
login
2533
echo "Building with DOCKER_GID=${DOCKER_GID}"
2634

27-
for svc in search-service; do
35+
for svc in post-service profile-service; do
2836
echo "Building $svc..."
2937
build_push_java "$svc"
3038
done
39+
# build_push_file_service
3140
}
3241

3342
main "$@"

docker-compose.prod-infra.yml

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -22,26 +22,6 @@ services:
2222
retries: 5
2323
networks: [ backend ]
2424

25-
post-db:
26-
image: bitnami/postgresql:latest
27-
container_name: post-db
28-
restart: unless-stopped
29-
environment:
30-
- POSTGRESQL_USERNAME=${POST_USERNAME}
31-
- POSTGRESQL_PASSWORD=${POST_DB_PASSWORD}
32-
- POSTGRESQL_DATABASE=${POST_DATABASE}
33-
- POSTGRESQL_POSTGRES_PASSWORD=${POST_DB_PASSWORD}
34-
ports:
35-
- "5439:5432"
36-
# volumes:
37-
# - post_pg_data:/bitnami/postgresql
38-
healthcheck:
39-
test: [ "CMD-SHELL","pg_isready -U postgres" ]
40-
interval: 10s
41-
timeout: 5s
42-
retries: 5
43-
networks: [ backend ]
44-
4525
quiz-db:
4626
image: bitnami/postgresql:latest
4727
container_name: quiz-db
@@ -122,6 +102,26 @@ services:
122102
retries: 5
123103
networks: [ backend ]
124104

105+
post-db:
106+
image: bitnami/postgresql:latest
107+
container_name: post-db
108+
restart: unless-stopped
109+
environment:
110+
- POSTGRESQL_USERNAME=${POST_USERNAME}
111+
- POSTGRESQL_PASSWORD=${POST_DB_PASSWORD}
112+
- POSTGRESQL_DATABASE=${POST_DATABASE}
113+
- POSTGRESQL_POSTGRES_PASSWORD=${POST_DB_PASSWORD}
114+
ports:
115+
- "5437:5432"
116+
volumes:
117+
- post_pg_data:/bitnami/postgresql
118+
healthcheck:
119+
test: [ "CMD-SHELL","pg_isready -U postgres" ]
120+
interval: 10s
121+
timeout: 5s
122+
retries: 5
123+
networks: [ backend ]
124+
125125
# ---------- Kafka ----------
126126
kafka:
127127
image: bitnami/kafka:latest
@@ -360,6 +360,7 @@ volumes:
360360
quiz_pg_data:
361361
coding_pg_data:
362362
ai_pg_data:
363+
post_pg_data:
363364
kafka_data:
364365
neo4j_data:
365366
redis_data:

docker-compose.prod-services.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,16 @@ services:
111111
ports: [ "8089:8089" ]
112112
networks: [ backend ]
113113

114+
post-service:
115+
image: ${DOCKERHUB_USER}/codecampus-post-service:${IMAGE_TAG:-latest}
116+
environment:
117+
- SPRING_PROFILES_ACTIVE=docker
118+
- POST_DATABASE=${POST_DATABASE}
119+
- POST_USERNAME=${POST_USERNAME}
120+
- POST_DB_PASSWORD=${POST_DB_PASSWORD}
121+
ports: [ "8090:8090" ]
122+
networks: [ backend ]
123+
114124
file-service:
115125
image: ${DOCKERHUB_USER}/codecampus-file-service:${IMAGE_TAG:-latest}
116126
environment:

docker/java-service-coding.Dockerfile

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,8 @@ WORKDIR /workspace
88
COPY pom.xml .
99
COPY common-protos/pom.xml common-protos/pom.xml
1010
COPY common-events/pom.xml common-events/pom.xml
11-
COPY gateway-service/pom.xml gateway-service/pom.xml
12-
COPY identity-service/pom.xml identity-service/pom.xml
13-
COPY profile-service/pom.xml profile-service/pom.xml
1411
COPY submission-service/pom.xml submission-service/pom.xml
15-
COPY quiz-service/pom.xml quiz-service/pom.xml
1612
COPY coding-service/pom.xml coding-service/pom.xml
17-
COPY ai-service/pom.xml ai-service/pom.xml
18-
COPY search-service/pom.xml search-service/pom.xml
19-
COPY notification-service/pom.xml notification-service/pom.xml
20-
COPY chat-service/pom.xml chat-service/pom.xml
2113

2214

2315
# Tải dependency trước để cache (Không compile)

0 commit comments

Comments
 (0)