Remove custom mysqldb image, just use latest public. Move bot docker to base directory.
This commit is contained in:
+21
@@ -0,0 +1,21 @@
|
|||||||
|
FROM python:3.8.10-slim
|
||||||
|
|
||||||
|
# install dependencies for mysqlclient
|
||||||
|
# RUN apt-get update && apt-get -y upgrade && apt-get -y install python3-dev default-libmysqlclient-dev build-essential
|
||||||
|
|
||||||
|
RUN pip install --upgrade pip
|
||||||
|
|
||||||
|
WORKDIR /home
|
||||||
|
|
||||||
|
COPY classes classes/
|
||||||
|
COPY cogs cogs/
|
||||||
|
COPY utilities utilities/
|
||||||
|
COPY highscores.py highscores.py
|
||||||
|
COPY requirements.txt requirements.txt
|
||||||
|
|
||||||
|
RUN pip install -r requirements.txt
|
||||||
|
|
||||||
|
# remove build deps that aren't needed to run
|
||||||
|
# RUN apt-get -y remove python3-dev build-essential && apt-get -y autoremove
|
||||||
|
|
||||||
|
CMD ["python3", "./highscores.py"]
|
||||||
+2
-4
@@ -2,7 +2,7 @@ version: "3"
|
|||||||
services:
|
services:
|
||||||
sqldb:
|
sqldb:
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
build: docker/MySql
|
image: mysql:latest
|
||||||
container_name: "Highscores-DataBase"
|
container_name: "Highscores-DataBase"
|
||||||
volumes:
|
volumes:
|
||||||
- highscores_data:/var/lib/mysql
|
- highscores_data:/var/lib/mysql
|
||||||
@@ -12,9 +12,7 @@ services:
|
|||||||
|
|
||||||
bot:
|
bot:
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
build:
|
build: .
|
||||||
context: ./
|
|
||||||
dockerfile: ./docker/Highscores_Bot/Dockerfile
|
|
||||||
container_name: "Highscores-Bot"
|
container_name: "Highscores-Bot"
|
||||||
depends_on:
|
depends_on:
|
||||||
- sqldb
|
- sqldb
|
||||||
|
|||||||
@@ -1,23 +0,0 @@
|
|||||||
FROM python:3.8.10-alpine3.14
|
|
||||||
|
|
||||||
# need to install build dependencies
|
|
||||||
RUN apk add --no-cache --update python3 mariadb-connector-c-dev \
|
|
||||||
&& apk add --no-cache --update --virtual build-deps python3-dev g++ gfortran musl-dev \
|
|
||||||
libffi-dev openssl-dev mariadb-dev
|
|
||||||
|
|
||||||
# upgrade pip
|
|
||||||
RUN pip install --upgrade pip
|
|
||||||
|
|
||||||
WORKDIR /home
|
|
||||||
|
|
||||||
COPY classes classes/
|
|
||||||
COPY cogs cogs/
|
|
||||||
COPY utilities utilities/
|
|
||||||
COPY highscores.py highscores.py
|
|
||||||
COPY requirements.txt requirements.txt
|
|
||||||
|
|
||||||
RUN pip install -r requirements.txt
|
|
||||||
|
|
||||||
RUN apk del build-deps
|
|
||||||
|
|
||||||
CMD ["python3", "./highscores.py"]
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
FROM mysql:latest
|
|
||||||
|
|
||||||
COPY highscores_database.sql /docker-entrypoint-initdb.d/
|
|
||||||
Reference in New Issue
Block a user