Compare commits

...

17 Commits

Author SHA1 Message Date
dn
bcba4f1030 Added code for TicTacToe game 2025-11-04 11:32:09 +01:00
dn
64ceee2080 Add Dashy conf 2025-10-27 13:27:21 +01:00
dn
8b9906672c homepage, docker integration and replica set to 3 2025-10-27 13:18:50 +01:00
dn
252999c990 revert 2025-10-27 08:21:56 +01:00
dn
2ec413e21e NPM port change 2025-10-27 08:16:17 +01:00
dn
a203b15639 homepage added port to domain 2025-04-08 13:52:39 +02:00
dn
87546e064d homepage edit domain 2025-04-08 13:49:55 +02:00
dn
f708520371 modified homepage 2025-04-08 13:47:41 +02:00
dn
53da042b20 Added homepage config 2025-04-08 13:43:12 +02:00
dn
8b86bb6213 update with new images 2025-02-10 22:17:44 +01:00
dn
155630f93a Added Shepherd DockerStack 2025-01-21 22:30:04 +01:00
dn
a421fe69c6 revert vaultwarden 2024-12-21 23:57:29 +01:00
dn
391fae1812 Vw update 2024-12-21 23:54:16 +01:00
dn
d24ae42ccf fix semaphore 2024-12-17 08:40:53 +01:00
dn
a95f41a323 modified semaphore 2024-12-17 08:34:24 +01:00
dn
4f18c40d94 added semaphore 2024-12-17 08:31:13 +01:00
dn
fbf96ab528 update 2024-12-13 12:38:29 +01:00
6 changed files with 210 additions and 1 deletions

View File

@@ -0,0 +1,28 @@
---
version: "3.8"
services:
dashy:
# To build from source, replace 'image: lissy93/dashy' with 'build: .'
# build: .
image: lissy93/dashy
container_name: Dashy
# Pass in your config file below, by specifying the path on your host machine
# volumes:
# - /root/my-config.yml:/app/user-data/conf.yml
ports:
- 8080:8080
# Set any environmental variables
environment:
- NODE_ENV=production
# Specify your user ID and group ID. You can find this by running `id -u` and `id -g`
# - UID=1000
# - GID=1000
# Specify restart policy
restart: unless-stopped
# Configure healthchecks
healthcheck:
test: ['CMD', 'node', '/app/services/healthcheck']
interval: 1m30s
timeout: 10s
retries: 3
start_period: 40s

View File

@@ -0,0 +1,31 @@
version: '3'
services:
homepage:
image: ghcr.io/gethomepage/homepage:latest
container_name: homepage
restart: unless-stopped
ports:
- 3065:3000
expose:
- 3065
environment:
- PUID=1000
- PGID=1000
- HOMEPAGE_ALLOWED_HOSTS=dockers.localdomain:3065 # add your FQDN here
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro # (optional) For docker integrations
- homep_conf:/app/config # Make sure your local config directory exists
- homep_ico:/app/public/icons
deploy:
mode: replicated
replicas: 3
volumes:
homep_conf:
driver: gfs_vol
homep_ico:
driver: gfs_vol

View File

@@ -0,0 +1,70 @@
version: '3'
services:
# uncomment this section and comment out the mysql section to use postgres instead of mysql
#postgres:
#restart: unless-stopped
#ports:
#- 5432:5432
#image: postgres:14
#hostname: postgres
#volumes:
# - semaphore-postgres:/var/lib/postgresql/data
#environment:
# POSTGRES_USER: semaphore
# POSTGRES_PASSWORD: semaphore
# POSTGRES_DB: semaphore
# if you wish to use postgres, comment the mysql service section below
mysql:
restart: unless-stopped
ports:
- 3306:3306
image: mysql:8.0
hostname: mysql
volumes:
- semaphore-mysql:/var/lib/mysql
environment:
MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
MYSQL_DATABASE: semaphore
MYSQL_USER: semaphore
MYSQL_PASSWORD: semaphore
deploy:
mode: replicated
replicas: 1
semaphore:
restart: unless-stopped
ports:
- 3000:3000
image: semaphoreui/semaphore:latest
volumes:
- semaphore_config:/config
environment:
SEMAPHORE_DB_USER: semaphore
SEMAPHORE_DB_PASS: semaphore
SEMAPHORE_DB_HOST: mysql # for postgres, change to: postgres
SEMAPHORE_DB_PORT: 3306 # change to 5432 for postgres
SEMAPHORE_DB_DIALECT: mysql
SEMAPHORE_DB: semaphore
SEMAPHORE_PLAYBOOK_PATH: /tmp/semaphore/
SEMAPHORE_ADMIN_PASSWORD: cGUtDmqTJCyaYqL2nbJm6qjBuL
SEMAPHORE_ADMIN_NAME: admin
SEMAPHORE_ADMIN_EMAIL: aveosysarch@outlook.com
SEMAPHORE_ADMIN: admin
SEMAPHORE_ACCESS_KEY_ENCRYPTION: gs72mPntFATGJs9qK0pQ0rKtfidlexiMjYCH9gWKhTU=
SEMAPHORE_LDAP_ACTIVATED: 'no' # if you wish to use ldap, set to: 'yes'
SEMAPHORE_LDAP_HOST: dc01.local.example.com
SEMAPHORE_LDAP_PORT: '636'
SEMAPHORE_LDAP_NEEDTLS: 'yes'
SEMAPHORE_LDAP_DN_BIND: 'uid=bind_user,cn=users,cn=accounts,dc=local,dc=shiftsystems,dc=net'
SEMAPHORE_LDAP_PASSWORD: 'ldap_bind_account_password'
SEMAPHORE_LDAP_DN_SEARCH: 'dc=local,dc=example,dc=com'
SEMAPHORE_LDAP_SEARCH_FILTER: "(\u0026(uid=%s)(memberOf=cn=ipausers,cn=groups,cn=accounts,dc=local,dc=example,dc=com))"
depends_on:
- mysql # for postgres, change to: postgres
deploy:
mode: replicated
replicas: 1
volumes:
semaphore-mysql: # to use postgres, switch to: semaphore-postgres
driver: gfs_vol
semaphore_config:
driver: gfs_vol

View File

@@ -0,0 +1,35 @@
version: "3"
services:
app:
image: containrrr/shepherd
environment:
TZ: 'Europe/Copenhagen'
FILTER_SERVICES: ''
IGNORELIST_SERVICES: ''
RUN_ONCE_AND_EXIT: "true"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
deploy:
replicas: 0
restart_policy:
condition: none
labels:
- swarm.cronjob.enable=true
- swarm.cronjob.schedule=0 1 * * *
- swarm.cronjob.skip-running=true
placement:
constraints:
- node.role == manager
scheduler:
image: crazymax/swarm-cronjob:latest
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
- "TZ=Europe/Copenhagen"
- "LOG_LEVEL=info"
- "LOG_JSON=false"
deploy:
placement:
constraints:
- node.role == manager

View File

@@ -19,7 +19,7 @@ services:
# - SMTP_SSL=${SMTP_SSL}
# - SMTP_USERNAME=${SMTP_USERNAME}
# - SMTP_PASSWORD=${SMTP_PASSWORD}
- DOMAIN='https://vw.aveosysarch.org'
- DOMAIN=https://vw.aveosysarch.org
deploy:
mode: replicated
replicas: 1

45
TicTacToe/TicTacToe.py Normal file
View File

@@ -0,0 +1,45 @@
# Tic Tac Toe game in Python
board = [' ' for _ in range(9)]
def print_board():
row1 = '| {} | {} | {} |'.format(board[0], board[1], board[2])
row2 = '| {} | {} | {} |'.format(board[3], board[4], board[5])
row3 = '| {} | {} | {} |'.format(board[6], board[7], board[8])
print()
print(row1)
print(row2)
print(row3)
print()
def check_win():
win_conditions = [(0, 1, 2), (3, 4, 5), (6, 7, 8), (0, 3, 6), (1, 4, 7), (2, 5, 8), (0, 4, 8), (2, 4, 6)]
for condition in win_conditions:
if board[condition[0]] == board[condition[1]] == board[condition[2]] != ' ':
return board[condition[0]]
if ' ' not in board:
return 'Tie'
return False
def game():
current_player = 'X'
while True:
print_board()
move = input("Player {}, enter your move (1-9): ".format(current_player))
if board[int(move) - 1] == ' ':
board[int(move) - 1] = current_player
result = check_win()
if result:
print_board()
if result == 'Tie':
print("It's a tie!")
else:
print("Player {} wins!".format(result))
break
current_player = 'O' if current_player == 'X' else 'X'
else:
print("Invalid move, try again.")
game()