made changes to t he docker system

This commit is contained in:
2025-01-03 15:51:41 +01:00
parent c3009c59c4
commit 0a5971cea4
3 changed files with 23 additions and 23 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
# =========== 1) Build stage ===========
FROM golang:1.20-alpine AS builder
FROM golang:1.23-alpine AS builder
# Create and set working directory
WORKDIR /app
+2 -1
View File
@@ -18,7 +18,8 @@ FROM nginx:alpine
# Copy production build to Nginx html folder.
# Adjust /usr/src/app/build -> /usr/src/app/dist if youre using Angular/Vue
COPY --from=build /usr/src/app/build /usr/share/nginx/html
#COPY --from=build /usr/src/app/build /usr/share/nginx/html
COPY --from=build /usr/src/app /usr/share/nginx/html
# Expose HTTP port
EXPOSE 80
+20 -21
View File
@@ -1,41 +1,40 @@
version: "3.8"
services:
mariadb:
image: mariadb:10.7
container_name: my_mariadb
environment:
- MYSQL_ROOT_PASSWORD=1234
- MYSQL_DATABASE=rollenspiel_db
ports:
- "3306:3306"
volumes:
- db_data:/var/lib/mysql
command: ['--character-set-server=utf8mb4', '--collation-server=utf8mb4_unicode_ci']
# mariadb:
# image: mariadb:10.7
# container_name: my_mariadb
# environment:
# - MYSQL_ROOT_PASSWORD=1234
# - MYSQL_DATABASE=rollenspiel_db
# ports:
# - "3306:3306"
# volumes:
# - db_data:/var/lib/mysql
# command: ['--character-set-server=utf8mb4', '--collation-server=utf8mb4_unicode_ci']
backend:
build:
context: ../backend
dockerfile: Dockerfile
dockerfile: ../docker/Dockerfile
container_name: backend
# environment:
# - YOUR_ENV=example
environment:
DB_HOST: mariadb
DB_USER: root
DB_PASS: 1234
DB_NAME: rollenspiel_db
# environment:
# DB_HOST: mariadb
# DB_USER: root
# DB_PASS: 1234
# DB_NAME: rollenspiel_db
ports:
- "8080:8080"
# volumes:
# - ./some-local-folder:/app/some-folder
# You can add more configuration as needed.
depends_on:
- mariadb
#depends_on:
# - mariadb
frontend:
build:
context: ../frontend
dockerfile: Dockerfile.frontend
dockerfile: ../docker/Dockerfile.frontend
container_name: frontend
ports:
- "3000:80"