8 changed files with 167 additions and 0 deletions
@ -0,0 +1 @@ |
|||
POSHEL=NAHUY |
@ -0,0 +1,6 @@ |
|||
пример как заупстить эту помойку на готовом сервер беря исходники с гита |
|||
|
|||
servers.json можно не класть если есть в гите |
|||
GeoLite2-Country.mmdb можно не класть если есть в гите |
|||
|
|||
nexus.pblr-nyk.pro удалитьь нахуй отовсюда если он есть если ты сам захочешь это говно раскатать |
@ -0,0 +1,12 @@ |
|||
FROM python:3.10 |
|||
RUN python -m pip config --user set global.index https://nexus.pblr-nyk.pro/repository/pypi-all/pypi && \ |
|||
python -m pip config --user set global.index-url https://nexus.pblr-nyk.pro/repository/pypi-all/simple && \ |
|||
python -m pip config --user set global.trusted-host nexus.pblr-nyk.pro |
|||
RUN python -m pip install git+https://git.pblr-nyk.pro/mirror/Yepoleb.python-a2s git+https://git.pblr-nyk.pro/mirror/conqp.rcon git+https://git.pblr-nyk.pro/mirror/tiangolo.fastapi "uvicorn[standard]" git+https://git.pblr-nyk.pro/mirror/ValvePython.steam && mkdir /app |
|||
ARG BUILDDATE |
|||
ENV BUILDDATE $BUILDDATE |
|||
RUN cd /tmp && echo $BUILDDATE && git clone https://git.pblr-nyk.pro/gsd/Facti13.Web.Backend.Java.V2 && cd ./Facti13.Web.Backend.Java.V2/ext/python-a2s-rcon-api && cp *.* /app && rm -r /tmp/Facti13.Web.Backend.Java.V2 |
|||
WORKDIR /app |
|||
ENV PYTHONUNBUFFERED 1 |
|||
EXPOSE 8082 |
|||
ENTRYPOINT ["python", "service.py"] |
@ -0,0 +1,82 @@ |
|||
services: |
|||
facti13_web_backend_v2: |
|||
build: ./java_backend |
|||
container_name: backend |
|||
restart: always |
|||
extra_hosts: |
|||
- "tf2.pblr-nyk.pro:192.168.3.1" |
|||
- "git.pblr-nyk.pro:192.168.3.1" |
|||
volumes: |
|||
- $PWD/servers.json:/app/servers.json:ro |
|||
- $PWD/GeoLite2-Country.mmdb:/app/geoip.mmdb:ro |
|||
- /etc/timezone:/etc/timezone:ro |
|||
- /etc/localtime:/etc/localtime:ro |
|||
env_file: |
|||
- .env |
|||
environment: |
|||
- A2S_BACKEND_URL=http://a2s_server:8082 |
|||
ports: |
|||
- 26272:8080 |
|||
- 8081:8081 |
|||
command: "-Xmx5120m -Xms256m -verbose:gc -XX:+UseZGC -Dio.netty.allocator.useCacheForAllThreads=false -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8081 -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -jar backend.jar" |
|||
depends_on: |
|||
- facti13_web_backend_v2_a2s_server |
|||
logging: |
|||
driver: "json-file" |
|||
options: |
|||
max-size: "5m" |
|||
networks: |
|||
- facti13_services_net |
|||
deploy: |
|||
resources: |
|||
limits: |
|||
cpus: "4.0" |
|||
memory: 6144M |
|||
facti13_web_backend_v2_a2s_server: |
|||
build: ./a2s_backend |
|||
container_name: a2s_server |
|||
restart: always |
|||
extra_hosts: |
|||
- "tf2.pblr-nyk.pro:192.168.33.1" |
|||
logging: |
|||
driver: "json-file" |
|||
options: |
|||
max-size: "5m" |
|||
networks: |
|||
- facti13_services_net |
|||
deploy: |
|||
resources: |
|||
limits: |
|||
cpus: "0.5" |
|||
memory: 512M |
|||
facti13_web_backend_v2_docker_client: |
|||
build: ./docker_client |
|||
container_name: f13_docker_client |
|||
restart: always |
|||
depends_on: |
|||
- facti13_web_backend_v2 |
|||
extra_hosts: |
|||
- "tf2.pblr-nyk.pro:192.168.3.1" |
|||
logging: |
|||
driver: "json-file" |
|||
options: |
|||
max-size: "5m" |
|||
networks: |
|||
- facti13_services_net |
|||
deploy: |
|||
resources: |
|||
limits: |
|||
cpus: "0.5" |
|||
memory: 512M |
|||
environment: |
|||
- ENDPOINT=https://tf2.pblr-nyk.pro |
|||
- SECRET_KEY= |
|||
- DOCKER_URL=unix:///var/run/docker.sock |
|||
volumes: |
|||
- /var/run/docker.sock:/var/run/docker.sock:ro |
|||
|
|||
networks: |
|||
facti13_services_net: |
|||
external: true |
|||
|
|||
#docker network create -d bridge --subnet 192.168.0.0/24 facti13_services_net |
@ -0,0 +1,12 @@ |
|||
FROM python:3.10 |
|||
RUN python -m pip config --user set global.index https://nexus.pblr-nyk.pro/repository/pypi-all/pypi && \ |
|||
python -m pip config --user set global.index-url https://nexus.pblr-nyk.pro/repository/pypi-all/simple && \ |
|||
python -m pip config --user set global.trusted-host nexus.pblr-nyk.pro |
|||
RUN python -m pip install aiodocker aiohttp && mkdir /app |
|||
ARG BUILDDATE |
|||
ENV BUILDDATE $BUILDDATE |
|||
RUN cd /tmp && echo $BUILDDATE && git clone https://git.pblr-nyk.pro/gsd/Facti13.Web.Backend.Java.V2 && cd ./Facti13.Web.Backend.Java.V2/ext/python-docker-client && cp *.* /app && rm -r /tmp/Facti13.Web.Backend.Java.V2 |
|||
WORKDIR /app |
|||
COPY ./ ./ |
|||
ENV PYTHONUNBUFFERED 1 |
|||
ENTRYPOINT ["python", "dockerclient.py"] |
@ -0,0 +1,15 @@ |
|||
FROM maven:3.8.7-openjdk-18 as builder |
|||
WORKDIR /tmp |
|||
COPY settings.xml /root/.m2/settings.xml |
|||
VOLUME maven_repo /root/.m2/repository |
|||
ARG BUILDDATE |
|||
ENV BUILDDATE $BUILDDATE |
|||
RUN echo $BUILDDATE && git clone https://git.pblr-nyk.pro/gsd/Facti13.Web.Backend.Java.V2 && \ |
|||
cd Facti13.Web.Backend.Java.V2 && \ |
|||
mvn -f pom.xml clean package -Dmaven.test.skip=true |
|||
FROM eclipse-temurin:18 |
|||
COPY --from=builder /tmp/Facti13.Web.Backend.Java.V2/target/*.jar /app/backend.jar |
|||
WORKDIR /app |
|||
ARG BUILDDATE |
|||
ENV BUILDDATE $BUILDDATE |
|||
ENTRYPOINT ["java"] |
@ -0,0 +1,37 @@ |
|||
<settings> |
|||
<mirrors> |
|||
<mirror> |
|||
<!--This sends everything else to /public --> |
|||
<id>nexus</id> |
|||
<mirrorOf>*</mirrorOf> |
|||
<url>https://nexus.pblr-nyk.pro/repository/maven/</url> |
|||
</mirror> |
|||
</mirrors> |
|||
<profiles> |
|||
<profile> |
|||
<id>nexus</id> |
|||
<!--Enable snapshots for the built in central repo to direct --> |
|||
<!--all requests to nexus via the mirror --> |
|||
<repositories> |
|||
<repository> |
|||
<id>central</id> |
|||
<url>http://central</url> |
|||
<releases><enabled>true</enabled></releases> |
|||
<snapshots><enabled>true</enabled></snapshots> |
|||
</repository> |
|||
</repositories> |
|||
<pluginRepositories> |
|||
<pluginRepository> |
|||
<id>central</id> |
|||
<url>http://central</url> |
|||
<releases><enabled>true</enabled></releases> |
|||
<snapshots><enabled>true</enabled></snapshots> |
|||
</pluginRepository> |
|||
</pluginRepositories> |
|||
</profile> |
|||
</profiles> |
|||
<activeProfiles> |
|||
<!--make the profile active all the time --> |
|||
<activeProfile>nexus</activeProfile> |
|||
</activeProfiles> |
|||
</settings> |
@ -0,0 +1,2 @@ |
|||
#!/bin/bash |
|||
docker compose build --build-arg BUILDDATE=$(date +%s) && docker compose down && docker compose up -d && docker compose logs -f |
Loading…
Reference in new issue