redone the docker for testing
parent
230e85d3d0
commit
c37470a53d
|
|
@ -29,7 +29,7 @@ load_dotenv()
|
|||
SECRET_KEY = os.getenv('SECRET_KEY')
|
||||
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = False
|
||||
DEBUG = True
|
||||
|
||||
ALLOWED_HOSTS = ['localhost', '127.0.0.1', 'beyond-heroes.com', 'www.beyond-heroes.com']
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,3 @@ ENV MARIADB_PASSWORD=DB_PASSWORD
|
|||
|
||||
# Expose the MariaDB port
|
||||
EXPOSE 3306
|
||||
|
||||
# Start the MariaDB service
|
||||
CMD ["mysqld"]
|
||||
|
|
|
|||
|
|
@ -0,0 +1,17 @@
|
|||
First of change the Env variables in the .env and the docker-compose.yml file to your own values.
|
||||
|
||||
Then create the docker container and run it with the following command:
|
||||
```bash
|
||||
docker-compose up --build
|
||||
```
|
||||
This starts the Database \
|
||||
Then run the following command to create the database tables:
|
||||
```bash
|
||||
python manage.py migrate
|
||||
python manage.py migrate --run-syncdb
|
||||
```
|
||||
|
||||
At last, run the following command to start the server:
|
||||
```bash
|
||||
python manage.py runserver 3030
|
||||
```
|
||||
|
|
@ -13,9 +13,3 @@ services:
|
|||
MARIADB_PASSWORD: 'DB_PASSWORD'
|
||||
ports:
|
||||
- "3306:3306"
|
||||
volumes:
|
||||
- mariadb_data:/var/lib/mysql
|
||||
|
||||
volumes:
|
||||
mariadb_data:
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue