added prod config
This commit is contained in:
1 parent
b9b15152bc
commit
3b97a57598
2 files changed
+67
-11
No files matched your search
@@ -0,0 +1,50 @@
|
|||||||
|
services:
|
||||||
|
backend:
|
||||||
|
image: golang:1.24
|
||||||
|
working_dir: /backend
|
||||||
|
ports:
|
||||||
|
- "8082:8080"
|
||||||
|
depends_on:
|
||||||
|
- db
|
||||||
|
environment:
|
||||||
|
- DATABASE_URL=${DATABASE_URL}
|
||||||
|
- ODH_LICENCE_KEY=${ODH_LICENCE_KEY}
|
||||||
|
- TZ=Europe/Berlin
|
||||||
|
volumes:
|
||||||
|
- ./backend:/backend
|
||||||
|
command: go run cmd/server/main.go
|
||||||
|
restart: unless-stopped
|
||||||
|
db:
|
||||||
|
image: postgres:14
|
||||||
|
environment:
|
||||||
|
POSTGRES_USER: postgres
|
||||||
|
POSTGRES_PASSWORD: postgres
|
||||||
|
POSTGRES_DB: postgres
|
||||||
|
# ports:
|
||||||
|
# - "5432:5432"
|
||||||
|
volumes:
|
||||||
|
- ./pgdata:/var/lib/postgresql/data
|
||||||
|
restart: unless-stopped
|
||||||
|
|
||||||
|
frontend:
|
||||||
|
build: ./frontend
|
||||||
|
working_dir: /app
|
||||||
|
ports:
|
||||||
|
- "8083:8000"
|
||||||
|
depends_on:
|
||||||
|
- db
|
||||||
|
environment:
|
||||||
|
- DATABASE_URL=${DATABASE_URL}
|
||||||
|
volumes:
|
||||||
|
- ./frontend:/app
|
||||||
|
- ./backend/public/storage:/app/public/storage
|
||||||
|
command: sh -c "composer install --no-interaction && php -S 0.0.0.0:8000 -t public"
|
||||||
|
restart: unless-stopped
|
||||||
|
|
||||||
|
admin:
|
||||||
|
image: adminer
|
||||||
|
restart: always
|
||||||
|
depends_on:
|
||||||
|
- db
|
||||||
|
ports:
|
||||||
|
- 5433:8080
|
||||||
+17
-11
@@ -2,8 +2,7 @@ services:
|
|||||||
backend:
|
backend:
|
||||||
image: golang:1.24
|
image: golang:1.24
|
||||||
working_dir: /backend
|
working_dir: /backend
|
||||||
ports:
|
|
||||||
- "8082:8080"
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
environment:
|
environment:
|
||||||
@@ -29,8 +28,6 @@ services:
|
|||||||
frontend:
|
frontend:
|
||||||
build: ./frontend
|
build: ./frontend
|
||||||
working_dir: /app
|
working_dir: /app
|
||||||
ports:
|
|
||||||
- "8083:8000"
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
environment:
|
environment:
|
||||||
@@ -40,11 +37,20 @@ services:
|
|||||||
- ./backend/public/storage:/app/public/storage
|
- ./backend/public/storage:/app/public/storage
|
||||||
command: sh -c "composer install --no-interaction && php -S 0.0.0.0:8000 -t public"
|
command: sh -c "composer install --no-interaction && php -S 0.0.0.0:8000 -t public"
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=true"
|
||||||
|
- "traefik.docker.network=traefik-docker_default"
|
||||||
|
- "traefik.http.routers.vindn.rule=Host(`${VIRTUAL_HOST}`) || Host(`www.${VIRTUAL_HOST}`)"
|
||||||
|
- "traefik.http.routers.vindn.entrypoints=websecure"
|
||||||
|
- "traefik.http.routers.vindn.tls.certresolver=letsencrypt"
|
||||||
|
- "traefik.http.services.vindn.loadbalancer.server.port=80"
|
||||||
|
- "traefik.http.routers.vindn.tls=true"
|
||||||
|
- "traefik.http.routers.vindn.middlewares=www-redirect-reverse_vindn"
|
||||||
|
- "traefik.http.middlewares.www-redirect-reverse_vindn.redirectregex.permanent=true"
|
||||||
|
- "traefik.http.middlewares.www-redirect-reverse_vindn.redirectregex.regex=^http[|s]://${VIRTUAL_HOST}/(.*)"
|
||||||
|
- "traefik.http.middlewares.www-redirect-reverse_vindn.redirectregex.replacement=https://www.${VIRTUAL_HOST}/$${1}"
|
||||||
|
|
||||||
admin:
|
networks:
|
||||||
image: adminer
|
traefik:
|
||||||
restart: always
|
external: true
|
||||||
depends_on:
|
name: traefik-docker_default
|
||||||
- db
|
|
||||||
ports:
|
|
||||||
- 5433:8080
|
|
||||||
Reference in new issue
Block a user