Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .env.dev
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
MAIN_DB_USER=postgres
MAIN_DB_PASSWORD=mysecretpassword
MAIN_DB_PASSWORD=p@S$w0rd!
MAIN_DB_VOLUME=./.data

BACK_HASH_SECRET=super-puper-mega-hash-soltt-solo
Expand All @@ -24,4 +24,4 @@ AWG_VOLUME=./.data-awg
BOT_TOKEN=6618328943:AAEKMZYUJOliAEdBkibrhg8QMMy_xni-jEg

INIT_SECURITY_KEEPER=admin:admin
INIT_DYNAMIC_PAGES=YES
INIT_DYNAMIC_PAGES=YES
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## `0.7.2` (2025-04-18)

### Hotfixes

- init: Proceed invalid character in db password
- frontend: fix env vars, replace to nginx template
- Single Deploy: add restart always policy

## `0.7.1` (2025-04-16)

### Hotfixes
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.7.1
0.7.2
2 changes: 1 addition & 1 deletion backend/src/EasyVPN.Api/EasyVPN.Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<Version>0.7.1</Version>
<Version>0.7.2</Version>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn);1591</NoWarn>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion backend/src/EasyVPN.Application/EasyVPN.Application.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Version>0.7.1</Version>
<Version>0.7.2</Version>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\EasyVPN.Domain\EasyVPN.Domain.csproj" />
Expand Down
2 changes: 1 addition & 1 deletion backend/src/EasyVPN.Contracts/EasyVPN.Contracts.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Version>0.7.1</Version>
<Version>0.7.2</Version>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion backend/src/EasyVPN.Domain/EasyVPN.Domain.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Version>0.7.1</Version>
<Version>0.7.2</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="ErrorOr" Version="2.0.1" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Version>0.7.1</Version>
<Version>0.7.2</Version>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\EasyVPN.Application\EasyVPN.Application.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
<Version>0.7.1</Version>
<Version>0.7.2</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="FluentAssertions" Version="7.0.0-alpha.4" />
Expand Down
23 changes: 12 additions & 11 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ services:
dockerfile: Dockerfile
environment:
- API=http://backend:80
- DB_CONNECTION_STRING=postgresql://${MAIN_DB_USER}:${MAIN_DB_PASSWORD}@database:5432
- DB_CONNECTION_STRING=postgresql://${MAIN_DB_USER}@database:5432
- DB_PASSWORD=${MAIN_DB_PASSWORD}
- CREATE_SECURITY_KEEPER=${INIT_SECURITY_KEEPER:-NO}
- CREATE_DYNAMIC_PAGES=${INIT_DYNAMIC_PAGES:-NO}
restart: no
Expand All @@ -35,7 +36,7 @@ services:
- POSTGRES_PASSWORD=${MAIN_DB_PASSWORD}
ports:
- "5432"
restart: unless-stopped
restart: always
volumes:
- ${MAIN_DB_VOLUME}:/var/lib/postgresql/data
networks:
Expand All @@ -57,7 +58,7 @@ services:
- JwtSettings__ExpiryMinutes=${BACK_AUTH_EXPIRE}
- ConnectionStrings__Postgres=User ID=${MAIN_DB_USER};Password=${MAIN_DB_PASSWORD};Host=database;Port=5432;
- ASPNETCORE_URLS=http://+:80
restart: unless-stopped
restart: always
networks:
- easy-vpn

Expand All @@ -72,9 +73,9 @@ services:
context: frontend/
dockerfile: Dockerfile
environment:
- REACT_APP_API_URL=http://localhost:${MAIN_PORT}/api/
- REACT_APP_AUTH_CHECK_MINUTES=${FRONT_CHECK_AUTH}
restart: unless-stopped
- API_URL=/api/
- AUTH_CHECK_MINUTES=${FRONT_CHECK_AUTH}
restart: always
networks:
- easy-vpn

Expand Down Expand Up @@ -109,7 +110,7 @@ services:
}
}' > /etc/nginx/nginx.conf && nginx -g 'daemon off;'
"
restart: unless-stopped
restart: always
networks:
- easy-vpn
# ╚═══ REGION: Base infractructure services ═══╝
Expand Down Expand Up @@ -140,7 +141,7 @@ services:
sysctls:
- net.ipv4.conf.all.src_valid_mark=1
- net.ipv4.ip_forward=1
restart: unless-stopped
restart: always

amneziawg-vpn-service:
image: easyvpn/amneziawg-vpn:latest
Expand All @@ -167,7 +168,7 @@ services:
- net.ipv4.ip_forward=1
devices:
- "/dev/net/tun:/dev/net/tun" # device mapping for TUN interface
restart: unless-stopped
restart: always
# ╚═══ REGION: VPN services ═══╝


Expand All @@ -178,5 +179,5 @@ services:
container_name: bot-service
environment:
- BOT_TOKEN=${BOT_TOKEN}
restart: unless-stopped
# ╚═══ REGION: Other services ═══╝
restart: always
# ╚═══ REGION: Other services ═══╝
2 changes: 1 addition & 1 deletion frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ COPY nginx.conf /etc/nginx/conf.d/default.conf

EXPOSE 3000

CMD ["nginx", "-g", "daemon off;"]
CMD ["/bin/sh", "-c", "envsubst < /usr/share/nginx/html/index.html > /usr/share/nginx/html/_index.html && mv /usr/share/nginx/html/_index.html /usr/share/nginx/html/index.html && exec nginx -g 'daemon off;'"]
4 changes: 2 additions & 2 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "easy-vpn-frontend",
"version": "0.7.1",
"version": "0.7.2",
"private": true,
"dependencies": {
"@emotion/react": "^11.13.3",
Expand Down
9 changes: 8 additions & 1 deletion frontend/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,12 @@

To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
--></body>
-->
<script>
window.APP_CONFIG = {
API_URL: '$API_URL',
AUTH_CHECK_MINUTES: '$AUTH_CHECK_MINUTES',
};
</script>
</body>
</html>
13 changes: 10 additions & 3 deletions frontend/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,18 @@ const defaultConfig: AppConfig = {
};

// Загрузка ENV переменных
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const rawConfig = (window as any).APP_CONFIG || {};
const config: AppConfig = {
ApiUrl: process.env.REACT_APP_API_URL || defaultConfig.ApiUrl,
ApiUrl:
rawConfig.API_URL && !rawConfig.API_URL.includes('$')
? rawConfig.API_URL
: defaultConfig.ApiUrl,

AuthCheckMinutes:
Number(process.env.REACT_APP_AUTH_CHECK_MINUTES) ||
defaultConfig.AuthCheckMinutes,
rawConfig.AUTH_CHECK_MINUTES && !rawConfig.AUTH_CHECK_MINUTES.includes('$')
? Number(rawConfig.AUTH_CHECK_MINUTES)
: defaultConfig.AuthCheckMinutes,
};

export default config;
4 changes: 3 additions & 1 deletion init/.env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
API=http//localhost:80/api
DB_CONNECTION_STRING="postgresql://postgres:mysecretpassword@localhost:5432"
DB_CONNECTION_STRING="postgresql://postgres@localhost:5432"
DB_PASSWORD=mysecretpassword

CREATE_SECURITY_KEEPER=admin:admin
CREATE_DYNAMIC_PAGES=YES
4 changes: 2 additions & 2 deletions init/init.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh
VERSION=0.7.1
VERSION=0.7.2

echo ""
echo "🔧 Data Initialization Script"
Expand All @@ -20,7 +20,7 @@ done

echo "🔌 Attempting to connect to database..."

export PGPASSWORD="$(echo "$DB_CONNECTION_STRING" | sed -n 's|postgresql://[^:]*:\([^@]*\)@.*|\1|p')"
export PGPASSWORD="$DB_PASSWORD"
psql "$DB_CONNECTION_STRING" -c "\dt" > /dev/null 2>&1
if [ $? -ne 0 ]; then
echo "❌ Failed to connect to the database!"
Expand Down
2 changes: 1 addition & 1 deletion services/AmneziaWgVpn/cmd/config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
service:
name: 'wireguard-vpn'
version: '0.7.1'
version: '0.7.2'
api:
port: "8010"
vpn:
Expand Down
2 changes: 1 addition & 1 deletion services/TelegramBot/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "easy-vpn-telegram-bot"
version = "0.7.1"
version = "0.7.2"
description = "Telegram Notification Bot for Easy VPN"
authors = ["Alex Poryadin (sw1pr0g) <[email protected]>"]
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion services/WireguardVpn/cmd/config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
service:
name: 'wireguard-vpn'
version: '0.7.1'
version: '0.7.2'
api:
port: "8000"
vpn:
Expand Down
Loading