Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
150 commits
Select commit Hold shift + click to select a range
e15d8ab
ui
NamSupawan Jan 31, 2025
45b09fb
vpn
NamSupawan Jan 31, 2025
419670f
template
NamSupawan Jan 31, 2025
85a18af
wg
NamSupawan Jan 31, 2025
5cb4312
vpn
NamSupawan Feb 1, 2025
139eeb8
vpn
NamSupawan Feb 1, 2025
b67b885
vpn
NamSupawan Feb 1, 2025
6bd89bc
vpn
NamSupawan Feb 1, 2025
d6a23a8
redirect
NamSupawan Feb 1, 2025
ccda009
btn
NamSupawan Feb 1, 2025
17fe598
vpn
NamSupawan Feb 1, 2025
0abb10c
btn
NamSupawan Feb 1, 2025
3ba48aa
wg
NamSupawan Feb 1, 2025
398d35c
fix error
NamSupawan Feb 1, 2025
c0daa11
fix error
NamSupawan Feb 1, 2025
58bbd9a
param
NamSupawan Feb 1, 2025
106a8e2
vpn
NamSupawan Feb 1, 2025
117750e
vpn users
NamSupawan Feb 1, 2025
3c1a54a
vpn users
NamSupawan Feb 1, 2025
756c879
vpn users-error
NamSupawan Feb 1, 2025
8aadf48
fix error
NamSupawan Feb 1, 2025
0200d14
vpnddd
NamSupawan Feb 1, 2025
d224200
method
NamSupawan Feb 1, 2025
d5e0e68
fix
NamSupawan Feb 1, 2025
6ad2488
open
NamSupawan Feb 1, 2025
d43a413
open
NamSupawan Feb 1, 2025
fd9ddbf
open
NamSupawan Feb 1, 2025
29b32f2
open
NamSupawan Feb 1, 2025
04ba672
open
NamSupawan Feb 1, 2025
1be8dea
open
NamSupawan Feb 1, 2025
49e64d2
open
NamSupawan Feb 1, 2025
be1341d
open
NamSupawan Feb 1, 2025
d271308
rem
NamSupawan Feb 1, 2025
3fc5cbf
open
NamSupawan Feb 2, 2025
557b7fe
firewall
NamSupawan Feb 2, 2025
6fcb2df
show
NamSupawan Feb 2, 2025
13a2c66
firewall
NamSupawan Feb 2, 2025
4171444
show
NamSupawan Feb 2, 2025
4fe5789
firewall
NamSupawan Feb 2, 2025
14b38a7
firewall
NamSupawan Feb 2, 2025
adb558f
firewall
NamSupawan Feb 2, 2025
e7d4621
firewall
NamSupawan Feb 2, 2025
2f68573
firewall
NamSupawan Feb 2, 2025
a9a6f44
firewall_params
NamSupawan Feb 2, 2025
c75325e
firewall_params
NamSupawan Feb 2, 2025
e560124
firewall_params
NamSupawan Feb 2, 2025
fefaad4
fix error
NamSupawan Feb 2, 2025
c118881
fix error
NamSupawan Feb 2, 2025
b7f6ef5
fix error
NamSupawan Feb 2, 2025
8ef73de
fix error
NamSupawan Feb 2, 2025
9d73f20
fix error
NamSupawan Feb 2, 2025
f05883d
fix error
NamSupawan Feb 2, 2025
d610bf3
fix error
NamSupawan Feb 2, 2025
99db980
fix error
NamSupawan Feb 2, 2025
6b4c7a9
fix error
NamSupawan Feb 2, 2025
6dab87c
fix error
NamSupawan Feb 2, 2025
d57ad56
fix error
NamSupawan Feb 2, 2025
b9d0920
fix error
NamSupawan Feb 2, 2025
5f0e25d
fix error
NamSupawan Feb 2, 2025
27905e0
fix error
NamSupawan Feb 2, 2025
409c8fe
fix error
NamSupawan Feb 2, 2025
7496f9e
fix error
NamSupawan Feb 2, 2025
ee79cbb
fix error
NamSupawan Feb 2, 2025
4b88825
fix error
NamSupawan Feb 2, 2025
5b12384
fix error
NamSupawan Feb 2, 2025
08297f5
fix error
NamSupawan Feb 2, 2025
c4bc830
fix error
NamSupawan Feb 2, 2025
871b5f3
fix error
NamSupawan Feb 2, 2025
8312bb7
fix error
NamSupawan Feb 2, 2025
e042bc8
html
NamSupawan Feb 2, 2025
e409a58
html
NamSupawan Feb 2, 2025
27f9f1a
html
NamSupawan Feb 2, 2025
a18f390
html
NamSupawan Feb 2, 2025
92ffba4
htmld
NamSupawan Feb 2, 2025
cfea219
firewall
NamSupawan Feb 2, 2025
6809887
url path
NamSupawan Feb 2, 2025
9165ec9
url path
NamSupawan Feb 2, 2025
0f59315
url path
NamSupawan Feb 2, 2025
aad34c1
url path
NamSupawan Feb 2, 2025
d4e287e
url path
NamSupawan Feb 2, 2025
27e7d59
url path
NamSupawan Feb 2, 2025
6e1dcb1
url path
NamSupawan Feb 2, 2025
cf5c7ce
url path
NamSupawan Feb 2, 2025
8b5e5fe
url path
NamSupawan Feb 2, 2025
5e431d2
url path
NamSupawan Feb 2, 2025
bc9552f
url path
NamSupawan Feb 2, 2025
2a602ba
url path
NamSupawan Feb 2, 2025
607d11b
url path
NamSupawan Feb 2, 2025
bb6669a
url path
NamSupawan Feb 2, 2025
cdea5af
url path
NamSupawan Feb 2, 2025
b7c7de1
url path
NamSupawan Feb 2, 2025
dbeaac0
url path
NamSupawan Feb 2, 2025
f7782b7
url path
NamSupawan Feb 2, 2025
4fe4f15
url path
NamSupawan Feb 2, 2025
fcfe0a5
url path
NamSupawan Feb 2, 2025
c5728e3
url path
NamSupawan Feb 2, 2025
2afe32e
url path
NamSupawan Feb 2, 2025
ea12a5f
url path
NamSupawan Feb 2, 2025
6d72fe1
url path
NamSupawan Feb 2, 2025
7967bb9
url path
NamSupawan Feb 2, 2025
7082eba
url path
NamSupawan Feb 2, 2025
1ff06fc
url path
NamSupawan Feb 2, 2025
1a97433
url path
NamSupawan Feb 2, 2025
d70d5ea
url path
NamSupawan Feb 2, 2025
9a765fe
url path
NamSupawan Feb 2, 2025
c5d264c
url path
NamSupawan Feb 2, 2025
68b5bfc
url path
NamSupawan Feb 2, 2025
207d888
url path
NamSupawan Feb 3, 2025
b2f965d
peer
NamSupawan Feb 3, 2025
8394d82
peer
NamSupawan Feb 4, 2025
8edbbf1
required field
NamSupawan Feb 4, 2025
e648988
ip Address
NamSupawan Feb 4, 2025
268d6ca
ip Address
NamSupawan Feb 4, 2025
74dc12e
ip Address
NamSupawan Feb 5, 2025
8bd03e0
test
NamSupawan Feb 6, 2025
eea234b
config
NamSupawan Feb 6, 2025
b8480d3
Adding DevContainer, updating rails
Sep 7, 2024
6598f7e
no prefetch over logout
Sep 12, 2024
c1652a3
Disabling Turbo
Sep 15, 2024
4fce786
Adding ansible
Sep 16, 2024
6254a1c
new rails prod setup
Sep 16, 2024
e01b76b
extra quote
Sep 16, 2024
52e55a8
Adding ruby-release and version
Sep 16, 2024
3a8dac1
don't install system ruby
Sep 16, 2024
e6a6ffd
making ruby setup first
Sep 16, 2024
6630fb2
libffi
Sep 16, 2024
2f78b49
ruby installation
Sep 16, 2024
01ef3c2
Adding libffi
Sep 16, 2024
192b804
type of deploy_user
Sep 16, 2024
8f10a34
Fixing rails prod setup
Sep 16, 2024
8122f54
making it idempotetent
Sep 16, 2024
b5b61b5
Updating environment variables
Sep 16, 2024
34d7ed3
Gate wireguard production install
Sep 16, 2024
7d0deca
Adding build-essential to shell script
Sep 16, 2024
a160504
Fixing unused vars
Sep 16, 2024
bd04c45
added qualified for directory
Sep 16, 2024
6768094
Updated to latest rails and yarn
Sep 16, 2024
7a3fd2c
bumped rails version
Sep 16, 2024
9270ca8
killing corepack prompt
Sep 16, 2024
907aa3d
Fixing
Oct 9, 2024
44ea424
Enabled keep alive
Oct 17, 2024
b41cacf
script
NamSupawan Feb 9, 2025
ce5c10d
conf
NamSupawan Feb 9, 2025
1a2f364
conf
NamSupawan Feb 9, 2025
b242a71
conf
NamSupawan Feb 9, 2025
5161c8b
conf
NamSupawan Feb 9, 2025
66bccec
conf
NamSupawan Feb 9, 2025
7cb813c
conf
NamSupawan Feb 9, 2025
dcfffe9
conf
NamSupawan Feb 9, 2025
376dd23
add
NamSupawan Jun 6, 2025
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
3 changes: 3 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Make sure RUBY_VERSION matches the Ruby version in .ruby-version
ARG RUBY_VERSION=3.3.4
FROM ghcr.io/rails/devcontainer/images/ruby:$RUBY_VERSION
43 changes: 43 additions & 0 deletions .devcontainer/compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: "gate_wireguard"

services:
rails-app:
build:
context: ..
dockerfile: .devcontainer/Dockerfile

volumes:
- ../..:/workspaces:cached

# Overrides default command so things don't shut down after the process ends.
command: sleep infinity

# Uncomment the next line to use a non-root user for all processes.
# user: vscode

# Use "forwardPorts" in **devcontainer.json** to forward an app port locally.
# (Adding the "ports" property to this file will not forward from a Codespace.)
depends_on:
- redis
- mysql

redis:
image: redis:7.2
restart: unless-stopped
volumes:
- redis-data:/data

mysql:
image: mysql/mysql-server:8.0
restart: unless-stopped
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: 'true'
MYSQL_ROOT_HOST: "%"
volumes:
- mysql-data:/var/lib/mysql
networks:
- default

volumes:
redis-data:
mysql-data:
31 changes: 31 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/ruby
{
"name": "gate_wireguard",
"dockerComposeFile": "compose.yaml",
"service": "rails-app",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/rails/devcontainer/features/activestorage": {},
"ghcr.io/rails/devcontainer/features/mysql-client": {},
"ghcr.io/itsmechlark/features/redis-server": {}
},
"containerEnv": {
"REDIS_URL": "redis://redis:6379/1",
"DB_HOST": "mysql"
},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [
3000,
3306,
6379
],
// Configure tool-specific properties.
// "customizations": {},
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root",
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "bin/setup"
}
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"ansible.python.interpreterPath": "/bin/python3.10"
}
Binary file added .yarn/install-state.gz
Binary file not shown.
925 changes: 925 additions & 0 deletions .yarn/releases/yarn-4.5.0.cjs

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.5.0.cjs
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# syntax = docker/dockerfile:1

# Make sure RUBY_VERSION matches the Ruby version in .ruby-version and Gemfile
ARG RUBY_VERSION=3.0.2
ARG RUBY_VERSION=3.3.4
FROM registry.docker.com/library/ruby:$RUBY_VERSION-slim as base

# Rails app lives here
Expand Down Expand Up @@ -36,12 +36,16 @@ RUN bundle install && \
rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git && \
bundle exec bootsnap precompile --gemfile


# Install node modules
COPY package.json yarn.lock ./
ENV CI=true
RUN corepack enable
RUN yarn install --frozen-lockfile

# Copy application code
COPY . .
COPY .env.sample .env

# Precompile bootsnap code for faster boot times
RUN bundle exec bootsnap precompile app/ lib/
Expand Down
8 changes: 4 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ source 'https://rubygems.org'
# ruby "3.0.2"

# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
gem 'rails', '~> 7.1.3', '>= 7.1.3.2'
gem 'rails'

# The original asset pipeline for Rails [https://github.com/rails/sprockets-rails]
gem 'sprockets-rails'

# Use mysql as the database for Active Record
gem 'mysql2', '~> 0.5'
gem 'mysql2'

# Use the Puma web server [https://github.com/puma/puma]
gem 'puma', '>= 5.0'
gem 'puma'

# Use JavaScript with ESM import maps [https://github.com/rails/importmap-rails]
gem 'importmap-rails'
Expand Down Expand Up @@ -76,4 +76,4 @@ gem 'dotenv-rails'
gem 'omniauth-google-oauth2'

gem 'redis'
gem 'rqrcode', '~> 2.2'
gem 'rqrcode'
Loading