Skip to content

Commit de8f9fa

Browse files
committed
chore(controller): upgrade to bookworm
1 parent c0e7a63 commit de8f9fa

3 files changed

Lines changed: 11 additions & 63 deletions

File tree

rootfs/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
FROM registry.drycc.cc/drycc/base:bullseye
1+
FROM registry.drycc.cc/drycc/base:bookworm
22

33
ENV DRYCC_UID=1001 \
44
DRYCC_GID=1001 \
55
DRYCC_HOME_DIR=/workspace \
6-
PYTHON_VERSION="3.10.11"
6+
PYTHON_VERSION="3.11"
77

88
RUN groupadd drycc --gid ${DRYCC_GID} \
99
&& useradd drycc -u ${DRYCC_UID} -g ${DRYCC_GID} -s /bin/bash -m -d ${DRYCC_HOME_DIR}

rootfs/Dockerfile.test

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
FROM registry.drycc.cc/drycc/base:bullseye
1+
FROM registry.drycc.cc/drycc/base:bookworm
22

33
ARG DRYCC_HOME_DIR=/workspace
44

55
COPY requirements.txt ${DRYCC_HOME_DIR}/requirements.txt
66
COPY dev_requirements.txt ${DRYCC_HOME_DIR}/dev_requirements.txt
77

88
ENV PGDATA="/opt/drycc/postgresql/data" \
9-
PYTHON_VERSION="3.10.11" \
10-
REDIS_VERSION="7.0.9" \
11-
RABBITMQ_VERSION="3.11.16" \
12-
POSTGRES_VERSION="14.5" \
9+
PYTHON_VERSION="3.11" \
10+
REDIS_VERSION="7.0.11" \
11+
RABBITMQ_VERSION="3.12.0" \
12+
POSTGRES_VERSION="15.3" \
1313
GOSU_VERSION="1.16"
1414

1515
RUN buildDeps='gcc rustc cargo libffi-dev musl-dev openssl'; \

rootfs/api/utils.py

Lines changed: 4 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import os
55
import re
66
import base64
7+
import string
78
import concurrent
89
import hashlib
910
import logging
@@ -63,62 +64,9 @@ def validate_label(value):
6364

6465
def generate_app_name():
6566
"""Return a randomly-generated memorable name."""
66-
adjectives = [
67-
'ablest', 'absurd', 'actual', 'aerial', 'allied', 'artful', 'atomic', 'august',
68-
'bamboo', 'benign', 'blonde', 'blurry', 'bolder', 'breezy', 'bubbly', 'burley',
69-
'candid', 'calmer', 'casual', 'cheery', 'classy', 'clever', 'convex', 'cubist',
70-
'dainty', 'dapper', 'decent', 'deluxe', 'docile', 'dogged', 'drafty', 'dreamy',
71-
'earthy', 'easier', 'echoed', 'edible', 'elfish', 'excess', 'exotic', 'expert',
72-
'fabled', 'famous', 'feline', 'finest', 'flaxen', 'folksy', 'frisky', 'frozen',
73-
'gaslit', 'gentle', 'gifted', 'ginger', 'global', 'golden', 'grassy', 'guided',
74-
'haptic', 'hearty', 'hidden', 'hipper', 'honest', 'humble', 'hungry', 'hushed',
75-
'iambic', 'iciest', 'iconic', 'indoor', 'inward', 'ironic', 'island', 'italic',
76-
'jagged', 'jangly', 'jaunty', 'jicama', 'jiggly', 'jovial', 'joyful', 'junior',
77-
'kabuki', 'karmic', 'keener', 'kiddie', 'kindly', 'kingly', 'klutzy', 'knotty',
78-
'lambda', 'latest', 'leader', 'linear', 'lively', 'lonely', 'loving', 'luxury',
79-
'madcap', 'madras', 'marble', 'mellow', 'metric', 'modest', 'molten', 'mystic',
80-
'native', 'nearby', 'nested', 'newish', 'nickel', 'nimbus', 'nonfat', 'normal',
81-
'oblong', 'oddest', 'offset', 'oldest', 'onside', 'orange', 'outlaw', 'owlish',
82-
'padded', 'pastry', 'peachy', 'pepper', 'player', 'preset', 'proper', 'pulsar',
83-
'quacky', 'quaint', 'quartz', 'queens', 'queued', 'quinoa', 'quirky', 'quoted',
84-
'racing', 'rental', 'ribbed', 'rising', 'rococo', 'rubber', 'rugged', 'rustic',
85-
'sanest', 'scenic', 'seeing', 'shadow', 'skiing', 'stable', 'steely', 'syrupy',
86-
'taller', 'tender', 'tested', 'timely', 'trendy', 'triple', 'truthy', 'twenty',
87-
'ultima', 'unbent', 'unisex', 'united', 'upbeat', 'uphill', 'usable', 'utmost',
88-
'vacuum', 'valued', 'vanity', 'velcro', 'velvet', 'verbal', 'violet', 'vulcan',
89-
'walkup', 'webbed', 'wicker', 'wiggly', 'wilder', 'wonder', 'wooden', 'woodsy',
90-
'yearly', 'yeasty', 'yellow', 'yeoman', 'yogurt', 'yonder', 'youthy', 'yuppie',
91-
'zaftig', 'zanier', 'zephyr', 'zeroed', 'zigzag', 'zipped', 'zircon', 'zydeco',
92-
]
93-
nouns = [
94-
'addendum', 'anaconda', 'airfield', 'aqualung', 'armchair', 'asteroid', 'autoharp',
95-
'babushka', 'backbone', 'bagpiper', 'barbecue', 'bookworm', 'bullfrog', 'buttress',
96-
'caffeine', 'checkers', 'chinbone', 'countess', 'crawfish', 'cucumber', 'cutpurse',
97-
'daffodil', 'darkroom', 'deadbolt', 'doghouse', 'dragster', 'drumroll', 'duckling',
98-
'earrings', 'earthman', 'eggplant', 'electron', 'elephant', 'espresso', 'eyetooth',
99-
'falconer', 'farmland', 'ferryman', 'fireball', 'fishbone', 'footwear', 'frosting',
100-
'gadabout', 'gasworks', 'gatepost', 'gemstone', 'gladness', 'goldfish', 'greenery',
101-
'hacienda', 'handbill', 'hardtack', 'hawthorn', 'headwind', 'henhouse', 'huntress',
102-
'icehouse', 'idealist', 'inchworm', 'instinct', 'inventor', 'insignia', 'ironwood',
103-
'jailbird', 'jamboree', 'jerrycan', 'jetliner', 'jokester', 'joyrider', 'jumpsuit',
104-
'kangaroo', 'keepsake', 'kerchief', 'keypunch', 'kingfish', 'knapsack', 'knothole',
105-
'ladybird', 'lakeside', 'lambskin', 'landmass', 'larkspur', 'lollipop', 'lungfish',
106-
'macaroni', 'mackinaw', 'magician', 'mainsail', 'milepost', 'mongoose', 'moonrise',
107-
'nailhead', 'nautilus', 'neckwear', 'newsreel', 'nonesuch', 'novelist', 'nuthatch',
108-
'occupant', 'odometer', 'offering', 'offshoot', 'original', 'organism', 'overalls',
109-
'pachinko', 'painting', 'pamphlet', 'paneling', 'pendulum', 'playroom', 'ponytail',
110-
'quacking', 'quadrant', 'quantity', 'queendom', 'question', 'quilting', 'quotient',
111-
'rabbitry', 'radiator', 'renegade', 'ricochet', 'riverbed', 'rosewood', 'rucksack',
112-
'sailfish', 'sandwich', 'sculptor', 'seashore', 'seedcake', 'skylight', 'stickpin',
113-
'tabletop', 'tailbone', 'teamwork', 'teaspoon', 'tinkerer', 'traverse', 'turbojet',
114-
'umbrella', 'underdog', 'undertow', 'unicycle', 'universe', 'uptowner', 'utensils',
115-
'vacation', 'vagabond', 'valkyrie', 'variable', 'villager', 'vineyard', 'vocalist',
116-
'waggoner', 'waxworks', 'waterbed', 'wayfarer', 'whitecap', 'windmill', 'woodshed',
117-
'yachting', 'yardbird', 'yardwork', 'yearbook', 'yearling', 'yeomanry', 'yodeling',
118-
'zaniness', 'zeppelin', 'ziggurat', 'zillions', 'zirconia', 'zoologer', 'zucchini',
119-
]
120-
return "{}-{}".format(
121-
random.choice(adjectives), random.choice(nouns))
67+
random_string = lambda num: ''.join(
68+
[random.choice(string.ascii_lowercase) for i in range(num)])
69+
return "{}-{}".format(random_string(6), random_string(8))
12270

12371

12472
def dict_diff(dict1, dict2):

0 commit comments

Comments
 (0)