simpler Dockerfile and compose test
This commit is contained in:
@@ -7,8 +7,12 @@ ENV PYTHONDONTWRITEBYTECODE=1
|
|||||||
ENV FLASK_ENV=production
|
ENV FLASK_ENV=production
|
||||||
ENV FLASK_SECRET=production-secret-change-me
|
ENV FLASK_SECRET=production-secret-change-me
|
||||||
|
|
||||||
# Set apt sources to use a faster mirror: https://mirror.init7.net/debian/
|
# Find location of apt sources list and change to a faster mirror
|
||||||
RUN sed -i 's|http://deb.debian.org/debian|https://mirror.init7.net/debian|g' /etc/apt/sources.list
|
RUN [ -f /etc/apt/sources.list ] && \
|
||||||
|
echo "/etc/apt/sources.list exists, proceeding to modify it." \
|
||||||
|
&& sed -i 's|http://deb.debian.org/debian|https://mirror.init7.net/debian|g' /etc/apt/sources.list \
|
||||||
|
|| \
|
||||||
|
(echo "/etc/apt/sources.list does not exist, exiting.")
|
||||||
|
|
||||||
# Install system dependencies
|
# Install system dependencies
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && apt-get install -y \
|
||||||
|
|||||||
@@ -25,8 +25,6 @@ services:
|
|||||||
- type: bind
|
- type: bind
|
||||||
source: ./logs
|
source: ./logs
|
||||||
target: /app/logs
|
target: /app/logs
|
||||||
depends_on:
|
|
||||||
- mysql
|
|
||||||
labels:
|
labels:
|
||||||
- coolify.managed=true
|
- coolify.managed=true
|
||||||
- traefik.enable=true
|
- traefik.enable=true
|
||||||
@@ -37,24 +35,6 @@ services:
|
|||||||
- jobs-network
|
- jobs-network
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
mysql:
|
|
||||||
image: mysql:8.0
|
|
||||||
environment:
|
|
||||||
- MYSQL_ROOT_PASSWORD="M11ffpgm."
|
|
||||||
- MYSQL_DATABASE=jobs
|
|
||||||
- MYSQL_USER=jobs
|
|
||||||
- MYSQL_PASSWORD=jobdb
|
|
||||||
ports:
|
|
||||||
- "3306:3306"
|
|
||||||
volumes:
|
|
||||||
- mysql_data:/var/lib/mysql
|
|
||||||
- ./mysql-init:/docker-entrypoint-initdb.d
|
|
||||||
networks:
|
|
||||||
- jobs-network
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
mysql_data:
|
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
jobs-network:
|
jobs-network:
|
||||||
driver: bridge
|
driver: bridge
|
||||||
|
|||||||
Reference in New Issue
Block a user