Skip to content

Commit f2ebefd

Browse files
committed
Docker update
1 parent 81b9073 commit f2ebefd

File tree

2 files changed

+50
-42
lines changed

2 files changed

+50
-42
lines changed

docker-compose.prod.yml

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,37 @@
11
services:
22
db:
3-
image: postgres:17
3+
image: mariadb:lts
44
ports:
5-
- 2345:5432
5+
- "3333:3306"
66
environment:
7-
POSTGRES_USER: trailcompass
8-
POSTGRES_PASSWORD: trailcompass
9-
POSTGRES_DB: trailcompass
7+
MARIADB_USER: trailcompass
8+
MARIADB_PASSWORD: trailcompass
9+
MARIADB_DATABASE: tc_system
10+
MARIADB_RANDOM_ROOT_PASSWORD: true
1011
volumes:
11-
- postgres-db-volume:/var/lib/postgresql/data
12+
- mariadb-volume:/var/lib/mysql:Z
1213
healthcheck:
13-
test: ["CMD", "pg_isready", "-U", "trailcompass"]
14-
interval: 5s
15-
retries: 5
14+
test: [ "CMD", "healthcheck.sh", "--connect", "--innodb_initialized" ]
15+
start_period: 10s
16+
interval: 10s
17+
timeout: 5s
18+
retries: 3
1619
restart: always
1720
networks:
18-
- postgres-db-network
21+
- internal-network
1922
server:
20-
image: ghcr.io/trailcompass/backend:latest
21-
environment:
22-
- POSTGRES=db:2345
23-
- POSTGRES_USER=trailcompass
24-
- POSTGRES_PASSWORD=trailcompass
25-
ports:
26-
- 8080:8080
27-
networks:
28-
- postgres-db-network
23+
image: ghcr.io/trailcompass/backend:latest
24+
environment:
25+
- MARIA=db:3333
26+
- MARIA_DB=tc_system
27+
- MARIA_USER=trailcompass
28+
- MARIA_PASSWORD=trailcompass
29+
ports:
30+
- "8080:8080"
31+
networks:
32+
- internal-network
2933

3034
volumes:
31-
postgres-db-volume:
35+
mariadb-volume:
3236
networks:
33-
postgres-db-network:
37+
internal-network:

docker-compose.yml

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,37 @@
11
services:
22
db:
3-
image: postgres:17
3+
image: mariadb:lts
44
ports:
5-
- 2345:5432
5+
- "3333:3306"
66
environment:
7-
POSTGRES_USER: trailcompass
8-
POSTGRES_PASSWORD: trailcompass
9-
POSTGRES_DB: trailcompass
7+
MARIADB_USER: trailcompass
8+
MARIADB_PASSWORD: trailcompass
9+
MARIADB_DATABASE: tc_system
10+
MARIADB_RANDOM_ROOT_PASSWORD: true
1011
volumes:
11-
- postgres-db-volume:/var/lib/postgresql/data
12+
- mariadb-volume:/var/lib/mysql:Z
1213
healthcheck:
13-
test: ["CMD", "pg_isready", "-U", "trailcompass"]
14-
interval: 5s
15-
retries: 5
14+
test: [ "CMD", "healthcheck.sh", "--connect", "--innodb_initialized" ]
15+
start_period: 10s
16+
interval: 10s
17+
timeout: 5s
18+
retries: 3
1619
restart: always
1720
networks:
18-
- postgres-db-network
21+
- internal-network
1922
server:
20-
build: .
21-
environment:
22-
- POSTGRES=db:2345
23-
- POSTGRES_USER=trailcompass
24-
- POSTGRES_PASSWORD=trailcompass
25-
ports:
26-
- 8080:8080
27-
networks:
28-
- postgres-db-network
23+
build: .
24+
environment:
25+
- MARIA=db:3333
26+
- MARIA_DB=tc_system
27+
- MARIA_USER=trailcompass
28+
- MARIA_PASSWORD=trailcompass
29+
ports:
30+
- "8080:8080"
31+
networks:
32+
- internal-network
2933

3034
volumes:
31-
postgres-db-volume:
35+
mariadb-volume:
3236
networks:
33-
postgres-db-network:
37+
internal-network:

0 commit comments

Comments
 (0)