Skip to content

Commit 1bab3bc

Browse files
lite image
1 parent 7e64737 commit 1bab3bc

File tree

4 files changed

+67
-2
lines changed

4 files changed

+67
-2
lines changed

docker-compose.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
version: "3.9"
2+
3+
services:
4+
db:
5+
image: postgres:11
6+
volumes:
7+
- ../build/db-data:/var/lib/postgresql/data/
8+
environment:
9+
- POSTGRES_PASSWORD=postgres
10+
11+
app:
12+
image: tolgee-platform-app
13+
build:
14+
context: ./build/docker
15+
dockerfile: Dockerfile
16+
ports:
17+
- "${exposePort}:8080"
18+
env_file:
19+
- .env
20+
depends_on:
21+
- db
22+
23+
smtp:
24+
image: namshi/smtp

docker/app/Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
FROM eclipse-temurin:21-alpine
1+
FROM postgres:13.21-alpine3.22
22

3-
RUN apk --no-cache add libxml2 bash
3+
ENTRYPOINT []
4+
5+
RUN apk --no-cache add openjdk21
6+
RUN apk --no-cache add libxml2
47

58
#############
69
### Tolgee #

docker/app/Dockerfile.lite

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
FROM eclipse-temurin:21-alpine
2+
3+
RUN apk --no-cache add libxml2 bash
4+
5+
#############
6+
### Tolgee #
7+
#############
8+
9+
# Expose application port
10+
EXPOSE 8080
11+
12+
# Define persistent volume for data storage
13+
VOLUME /data
14+
15+
# Environment variables for configuration
16+
ENV HEALTHCHECK_PORT=8080 \
17+
spring_profiles_active=docker
18+
19+
# Copy necessary application files
20+
COPY BOOT-INF/lib /app/lib
21+
COPY META-INF /app/META-INF
22+
COPY BOOT-INF/classes /app
23+
COPY --chmod=755 cmd.sh /app
24+
25+
#################
26+
### Let's go ##
27+
#################
28+
29+
# Define the startup command
30+
ENTRYPOINT ["/app/cmd.sh"]
31+
32+
33+
# Health check to ensure the app is up and running
34+
HEALTHCHECK --interval=10s --timeout=3s --retries=20 \
35+
CMD wget --spider -q "http://127.0.0.1:$HEALTHCHECK_PORT/actuator/health" || exit 1

docker/docker-compose.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ services:
77
- POSTGRES_PASSWORD=postgres
88
app:
99
image: tolgee/tolgee
10+
#build:
11+
# context: ../build/docker
12+
# dockerfile: Dockerfile
1013
ports:
1114
- ${exposePort}:8080
1215
env_file:

0 commit comments

Comments
 (0)