mirror of https://github.com/JohnHammond/CTFd.git
Changing to Ubuntu and docker-compose v2. Closes #185
parent
6eee636893
commit
09398b2ab0
11
Dockerfile
11
Dockerfile
|
@ -1,8 +1,11 @@
|
|||
FROM alpine:3.2
|
||||
RUN apk update && apk upgrade
|
||||
RUN apk add git gcc musl-dev libffi-dev python python-dev py-pip
|
||||
FROM ubuntu:latest
|
||||
RUN apt-get update -y
|
||||
RUN apt-get upgrade -y
|
||||
RUN apt-get install build-essential python-dev python-pip libffi-dev -y
|
||||
|
||||
RUN mkdir /opt
|
||||
VOLUME ["/opt/CTFd"]
|
||||
|
||||
RUN mkdir -p /opt/CTFd
|
||||
COPY . /opt/CTFd
|
||||
WORKDIR /opt/CTFd
|
||||
|
||||
|
|
|
@ -1,26 +1,21 @@
|
|||
ctfd:
|
||||
build: .
|
||||
restart: always
|
||||
ports:
|
||||
- "8000:8000"
|
||||
environment:
|
||||
- DATABASE_URL=mysql+pymysql://root@db/ctfd
|
||||
volumes_from:
|
||||
- data:rw
|
||||
links:
|
||||
- db:db
|
||||
version: '2'
|
||||
|
||||
db:
|
||||
image: mysql
|
||||
environment:
|
||||
- MYSQL_ALLOW_EMPTY_PASSWORD=yes
|
||||
volumes_from:
|
||||
- data:rw
|
||||
|
||||
data:
|
||||
image: mysql
|
||||
restart: always
|
||||
volumes:
|
||||
- /var/lib/mysql
|
||||
- /opt/CTFd/CTFd/logs
|
||||
command: "tail -f /dev/null"
|
||||
services:
|
||||
ctfd:
|
||||
build: .
|
||||
restart: always
|
||||
ports:
|
||||
- "8000:8000"
|
||||
environment:
|
||||
- DATABASE_URL=mysql+pymysql://root@db/ctfd
|
||||
volumes:
|
||||
- .data/CTFd/logs:/opt/CTFd/CTFd/logs
|
||||
links:
|
||||
- db:db
|
||||
|
||||
db:
|
||||
image: mysql
|
||||
environment:
|
||||
- MYSQL_ALLOW_EMPTY_PASSWORD=yes
|
||||
volumes:
|
||||
- .data/mysql:/var/lib/mysql
|
||||
|
|
Loading…
Reference in New Issue