basic template
This commit is contained in:
commit
ed1d4d1ca9
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
.vscode
|
||||
.idea
|
13
Dockerfile
Normal file
13
Dockerfile
Normal file
@ -0,0 +1,13 @@
|
||||
FROM golang:1.23 AS build
|
||||
|
||||
COPY . /build
|
||||
WORKDIR /build
|
||||
|
||||
RUN CGO_ENABLED=0 go build -o /build/app
|
||||
|
||||
FROM scratch
|
||||
COPY --from=build /build/app /app
|
||||
|
||||
EXPOSE 5000
|
||||
|
||||
ENTRYPOINT [ "/app" ]
|
19
default.conf.template
Normal file
19
default.conf.template
Normal file
@ -0,0 +1,19 @@
|
||||
server {
|
||||
listen ${NGINX_PORT};
|
||||
|
||||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html index.htm;
|
||||
}
|
||||
|
||||
error_page 404 /404.html;
|
||||
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /usr/share/nginx/html;
|
||||
}
|
||||
|
||||
location ~ api\/?.* {
|
||||
proxy_pass http://backend:5000;
|
||||
}
|
||||
}
|
42
docker-compose.yml
Normal file
42
docker-compose.yml
Normal file
@ -0,0 +1,42 @@
|
||||
services:
|
||||
db:
|
||||
image: postgres:17-bookworm
|
||||
ports:
|
||||
- 5432:5432
|
||||
environment:
|
||||
POSTGRES_USER: admin
|
||||
POSTGRES_PASSWORD: admin
|
||||
POSTGRES_DB: szoe
|
||||
PGDATA: /var/lib/postgresql/data/pgdata
|
||||
volumes:
|
||||
- pgdata:/var/lib/postgresql/data
|
||||
|
||||
adminer:
|
||||
image: adminer
|
||||
ports:
|
||||
- 8080:8080
|
||||
depends_on:
|
||||
- db
|
||||
|
||||
nginx:
|
||||
image: nginx:1.27-alpine-slim
|
||||
ports:
|
||||
- 80:80
|
||||
environment:
|
||||
NGINX_PORT: 80
|
||||
volumes:
|
||||
- ./default.conf.template:/etc/nginx/templates/default.conf.template:ro
|
||||
- ./static:/usr/share/nginx/html:ro
|
||||
|
||||
backend:
|
||||
image: dowerx/szoe
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
tags:
|
||||
- dowerx/szoe
|
||||
depends_on:
|
||||
- db
|
||||
|
||||
volumes:
|
||||
pgdata:
|
1
static/404.html
Normal file
1
static/404.html
Normal file
@ -0,0 +1 @@
|
||||
<h1>404 :c</h1>
|
11
static/index.html
Normal file
11
static/index.html
Normal file
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="hu">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>SZOE pontok</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>SZOE pontok</h1>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user